You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Error: Uncaught (in promise): TypeError: Cannot read property 'length' of null" error thrown when using <inline-editor type="textarea" when [(ngModel)]="null"
#92
Closed
jmorganmartin opened this issue
Sep 13, 2017
· 4 comments
If booking.description is null, triggers the error:
Error: Uncaught (in promise): TypeError: Cannot read property 'length' of null
The workaround is to write a quick check to prevent passing a variable that might be null (an empty string, '', is fine). I believe this issue is new to one of the recent updates.
Triggered in ngx-inline-editor.es5.js (line 235):
var _a = this.config, min = _a.min, max = _a.max;
var /** @type {?} */ length = this.isNumeric ? Number(value) : value.length;
If value is null, value.length triggers this error.
The text was updated successfully, but these errors were encountered:
The error is fairly self-explanatory. Using version 0.2.0-alpha.11.
Here is my code:
If
booking.description
isnull
, triggers the error:The workaround is to write a quick check to prevent passing a variable that might be
null
(an empty string,''
, is fine). I believe this issue is new to one of the recent updates.Triggered in ngx-inline-editor.es5.js (line 235):
If
value
isnull
,value.length
triggers this error.The text was updated successfully, but these errors were encountered: