Browse Source

Check script container before append

pull/3281/head
Artur Arseniev 6 years ago
parent
commit
5c0fee05d6
  1. 5
      src/canvas/view/CanvasView.js

5
src/canvas/view/CanvasView.js

@ -309,7 +309,10 @@ export default Backbone.View.extend({
}, 1);`; }, 1);`;
// #873 // #873
// Adding setTimeout will make js components work on init of the editor // Adding setTimeout will make js components work on init of the editor
setTimeout(() => view.scriptContainer.get(0).appendChild(script), 0); setTimeout(() => {
const scr = view.scriptContainer;
scr && scr.get(0).appendChild(script);
}, 0);
}, },
/** /**

Loading…
Cancel
Save