From 0862031bf964fe7ff0347b5a3bddb0225f0f3bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=AA=20Duy=20Quang?= Date: Wed, 13 Jan 2021 21:56:34 +0700 Subject: [PATCH] Fixed grammar errors. --- .../resources/language/javascript/cannot-read-property.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/resources/language/javascript/cannot-read-property.md b/src/content/resources/language/javascript/cannot-read-property.md index 0b7ecd5..437d221 100644 --- a/src/content/resources/language/javascript/cannot-read-property.md +++ b/src/content/resources/language/javascript/cannot-read-property.md @@ -76,10 +76,10 @@ undefined #### `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. If left unchecked and the returned value is used in other places, the "Cannot -read property" might arise. +read property" error might arise. ```html @@ -129,8 +129,8 @@ Uncaught TypeError: Cannot read property 'message' of undefined ## Fixing -The way to fix the "Cannot read property `abc` of `null`/`undefined`" is of -course, to make sure what is being retrieved properties from is not either +The way to fix the "Cannot read property `abc` of `null`/`undefined`" error is +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 determines how the issue shall be fixed.