Skip to content

Commit 48b23ee

Browse files
committed
type: Fix type errors.
1 parent 1f00b6d commit 48b23ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/CodeMirror/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export default class ReactCodeMirror extends Component<ICodeMirror, ICodeMirrorS
151151
const eventDict = this.getEventHandleFromProps();
152152
Object.keys(eventDict).forEach((event: string) => {
153153
const handle = this.props[event];
154-
this.editor.on(eventDict[event], handle);
154+
this.editor.on(eventDict[event] as keyof CodeMirror.EditorEventMap, handle);
155155
});
156156
// Init value
157157
this.editor.setValue(value || '');

0 commit comments

Comments
 (0)