We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 280f458 commit 9481976Copy full SHA for 9481976
src/index.js
@@ -29,7 +29,9 @@ function ReactCodeMirror(props = {}, ref) {
29
const eventDict = {};
30
eventHandle.forEach((ele) => {
31
const name = ele.slice(2);
32
- eventDict[ele] = name.replace(name[0],name[0].toLowerCase());
+ if (name && name[0]) {
33
+ eventDict[ele] = name.replace(name[0], name[0].toLowerCase());
34
+ }
35
});
36
37
return eventDict;
0 commit comments