Cannot read properties of null (reading 'replace')
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 09:26 PM
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 09:28 PM
There is some string function being done on non-string or empty value.
add .toString() to the string which is being replaced.
Raghav
MVP 2023
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 09:32 PM
@Pavan Santhosh1 There is some code where .replace is used but the string is undefined. So check where .replace is used and fix the issue with undefined.
Ex:
var a = undefned;
a.replace('s','');
In above example a is undefined and hence replace cannot be used on it.
Please mark as correct answer if this solves your issue.
Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023
ServiceNow Community Rising Star, Class of 2023