chore: unRegisterHooks -> unregisterHooks

This commit is contained in:
力皓 2020-08-24 20:46:09 +08:00
parent 85a05f6de4
commit 791501e2e0

View File

@ -117,7 +117,7 @@ export class Editor extends EventEmitter implements IEditor {
const { shortCuts = [], lifeCycles = {} } = this.config; const { shortCuts = [], lifeCycles = {} } = this.config;
// unRegistShortCuts(shortCuts); // unRegistShortCuts(shortCuts);
this.unRegisterHooks(); this.unregisterHooks();
if (lifeCycles.destroy) { if (lifeCycles.destroy) {
lifeCycles.destroy(this); lifeCycles.destroy(this);
@ -145,7 +145,7 @@ export class Editor extends EventEmitter implements IEditor {
}); });
}; };
unRegisterHooks = () => { unregisterHooks = () => {
this.hooks.forEach(({ message, handler }) => { this.hooks.forEach(({ message, handler }) => {
this.removeListener(message, handler); this.removeListener(message, handler);
}); });