Uncaught TypeError: Cannot read property 'replace' of undefined
See original GitHub issueFails in both cases, when string is null
or when it is undefined
.
Should be return str && str.replace...
.
Occurs in multiple places: https://github.com/lovasoa/react-contenteditable/commit/aa9a48732bef3352e9a958eea954a4d93b8315d7
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:8 (2 by maintainers)
Top Results From Across the Web
[SOLVED] Cannot Read Property 'replace' of Undefined in JS
To fix the “cannot read property 'replace' of undefined” error, perform an undefined check on the variable before calling the replace() method ......
Read more >Cannot read property 'replace' of Undefined in JS - Isotropic
In the above example, the first string was not initialized so the error showed up. The second string worked fine at first because...
Read more >cannot read property 'replace' of undefined In Grid - Stack ...
I think jQuery cannot find the element. First of all find the element var rowTemplate= document.getElementsByName("rowTemplate");.
Read more >TypeError: Cannot read property 'replace' of undefined
So I tried to learn how to do this on my own by taking two video courses about node and cheerio on udemy...
Read more >editor.min.js Uncaught TypeError: Cannot read property ...
editor.min.js Uncaught TypeError: Cannot read property 'replace' of undefined ... It might be an issue with theme itself, so created almost empty theme...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you very much to @aleemb for reporting and fixing this bug, and sorry for the lack of reactivity.
I published a new version on npm, so the bug is fixed as of version
2.1.1
.@krue-doug https://www.npmjs.com/package/react-contenteditable/v/2.0.7