undefined is not an object (evaluating 'e.slice')
See original GitHub issueAfter upgrading to 1.6.0
from 1.4.10
as a part of working around https://github.com/nosir/cleave.js/issues/593 , I have now seen this come up twice in bug reports:
TypeError undefined is not an object (evaluating 'e.slice')
../node_modules/cleave.js/dist/cleave-react-node.js:2536 getPostDelimiter
../node_modules/cleave.js/dist/cleave-react-node.js:344 onChange
[native code] onChange
../node_modules/react-dom/cjs/react-dom.production.min.js:15:202 ka
../node_modules/react-dom/cjs/react-dom.production.min.js:15:355 qa
../node_modules/react-dom/cjs/react-dom.production.min.js:16:31 ra
../node_modules/react-dom/cjs/react-dom.production.min.js:16:235 wa
../node_modules/react-dom/cjs/react-dom.production.min.js:17:239 Aa
[native code] forEach
../node_modules/react-dom/cjs/react-dom.production.min.js:17:19 ya
../node_modules/react-dom/cjs/react-dom.production.min.js:17:411 Ba
../node_modules/react-dom/cjs/react-dom.production.min.js:85:402 Pd
../node_modules/react-dom/cjs/react-dom.production.min.js:87:246 Ud
[native code] Be
../node_modules/scheduler/cjs/scheduler.production.min.js:20:126
../node_modules/react-dom/cjs/react-dom.production.min.js:207:389 fj
../node_modules/react-dom/cjs/react-dom.production.min.js:86:239 Sd
[native code] je
I haven’t figured out how to reproduce it yet, but the relevant code seems to have been changed recently at https://github.com/nosir/cleave.js/pull/582
So far the bug has happened on this device:
Safari 13.0.5
en-US
Mac OS X 10.15
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:11
Top Results From Across the Web
TypeError: undefined is not an object (evaluating 'object['body']')
As people pointed out in the comments, an initial render is done before componentDidMount , so that's the reason why you're getting the ......
Read more >ERROR TypeError: undefined is not an object (evaluating ...
Ever encountered this error → ERROR TypeError: undefined is not an object (evaluating '_this.props.navigation.navigate') whilst working hard on your project?
Read more >undefined is not an object (evaluating 'response.data')
Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'response.data'). Hi, I'm trying to make my Flash component have a level ...
Read more >null is not an object (evaluating 'delete i[s[u]]') – Noibu
slice.call(s, 1, u).join(".") + " is not defined in this storage"); if (e.isArray ...
Read more >TypeError undefined is not an object (evaluating 'e.target.hash ...
Hello, my client is using Log Rocket and we are seeing this error in the Divi script, any ideas what it could be?...
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
I encountered the same issue, but I did not want to downgrade the Cleave.js version. The issue is that
lastInputValue
is undefined untill the first input, so I just initialized it with empty string. (usingonInit
method)Now it works for me. Any comment would be welcome.
Just to add another case for this, I’m getting what I think is a related bug when I try to use Enzyme’s
simulate
function to simulate a change event on the nativeinput
element within a Jest unit test. The error I’m getting in this case is:This doesn’t happen when using Cleave version 1.5.10, it was definitely introduced in 1.6.0.