summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorYukai Huang2017-03-28 17:11:20 +0800
committerYukai Huang2017-03-28 17:11:20 +0800
commitdf743ab902e1427b12842ff9542ce9189c37f2b6 (patch)
tree63223a7e3d1c2a0b9a7a6f3504383ddf80faa244 /public
parent46ed658d8bd4fb916dd4964692aa23dc18c128ca (diff)
Fix listener “this” context
Diffstat (limited to '')
-rw-r--r--public/js/lib/editor/index.js2
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))
})
}