From a00c4c6016c3519fdfbaf008a5faa46d894e0fda Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sat, 19 Jan 2019 01:53:44 +0100 Subject: [PATCH] Pass the editor instance on `load` event --- src/editor/view/EditorView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/view/EditorView.js b/src/editor/view/EditorView.js index 00a061169..b913192c8 100644 --- a/src/editor/view/EditorView.js +++ b/src/editor/view/EditorView.js @@ -2,7 +2,7 @@ const $ = Backbone.$; module.exports = Backbone.View.extend({ initialize() { - const model = this.model; + const { model } = this; model.view = this; this.conf = model.config; this.pn = model.get('Panels'); @@ -10,7 +10,7 @@ module.exports = Backbone.View.extend({ this.pn.active(); this.pn.disableButtons(); model.runDefault(); - setTimeout(() => model.trigger('load'), 0); + setTimeout(() => model.trigger('load', model.get('Editor'))); }); },