Skip to content

Commit

Permalink
type: Fix type errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 21, 2021
1 parent 1f00b6d commit 48b23ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/CodeMirror/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default class ReactCodeMirror extends Component<ICodeMirror, ICodeMirrorS
const eventDict = this.getEventHandleFromProps();
Object.keys(eventDict).forEach((event: string) => {
const handle = this.props[event];
this.editor.on(eventDict[event], handle);
this.editor.on(eventDict[event] as keyof CodeMirror.EditorEventMap, handle);
});
// Init value
this.editor.setValue(value || '');
Expand Down

0 comments on commit 48b23ee

Please sign in to comment.