mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-06 23:43:45 +02:00
Fixed grammar errors.
This commit is contained in:
committed by
Jean-Philippe Sirois
parent
ac1ed508f7
commit
0862031bf9
@@ -76,10 +76,10 @@ undefined
|
|||||||
|
|
||||||
#### `null` from failed queries
|
#### `null` from failed queries
|
||||||
|
|
||||||
Some functions, for example `getElementById` from the browser API, returns
|
Some functions, for example `getElementById` from the browser API, return
|
||||||
`null` if the function failed to find any result matching what is requested.
|
`null` if the function failed to find any result matching what is requested.
|
||||||
If left unchecked and the returned value is used in other places, the "Cannot
|
If left unchecked and the returned value is used in other places, the "Cannot
|
||||||
read property" might arise.
|
read property" error might arise.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@@ -129,8 +129,8 @@ Uncaught TypeError: Cannot read property 'message' of undefined
|
|||||||
|
|
||||||
## Fixing
|
## Fixing
|
||||||
|
|
||||||
The way to fix the "Cannot read property `abc` of `null`/`undefined`" is of
|
The way to fix the "Cannot read property `abc` of `null`/`undefined`" error is
|
||||||
course, to make sure what is being retrieved properties from is not either
|
of course, to make sure what is being retrieved properties from is not either
|
||||||
`null` or `undefined`. Based on the reason behind the error, the programmer
|
`null` or `undefined`. Based on the reason behind the error, the programmer
|
||||||
determines how the issue shall be fixed.
|
determines how the issue shall be fixed.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user