diff options
author | Yukai Huang | 2017-03-28 17:11:20 +0800 |
---|---|---|
committer | Yukai Huang | 2017-03-28 17:11:20 +0800 |
commit | df743ab902e1427b12842ff9542ce9189c37f2b6 (patch) | |
tree | 63223a7e3d1c2a0b9a7a6f3504383ddf80faa244 /public | |
parent | 46ed658d8bd4fb916dd4964692aa23dc18c128ca (diff) |
Fix listener “this” context
Diffstat (limited to '')
-rw-r--r-- | public/js/lib/editor/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/public/js/lib/editor/index.js b/public/js/lib/editor/index.js index a68092ff..dead0c40 100644 --- a/public/js/lib/editor/index.js +++ b/public/js/lib/editor/index.js @@ -127,7 +127,7 @@ export default class Editor { } this.editor.on(event, (...args) => { - this.eventListeners[event].forEach(cb => cb(...args)) + this.eventListeners[event].forEach(cb => cb.bind(this)(...args)) }) } |