Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:artf/grapesjs into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Mar 4, 2021
2 parents 7ad618e + ad870f4 commit 52a7e06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/canvas/view/CanvasView.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export default Backbone.View.extend({
const scriptFn = model.getScriptString();
const scriptFnStr = model.get('script-props')
? scriptFn
: `function(){${scriptFn};}`;
: `function(){\n${scriptFn}\n;}`;
const scriptProps = JSON.stringify(model.__getScriptProps());
script.innerHTML = `
setTimeout(function() {
Expand Down
2 changes: 1 addition & 1 deletion src/code_manager/model/JsGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default Backbone.Model.extend({
code += `
var items = document.querySelectorAll('${ids}');
for (var i = 0, len = items.length; i < len; i++) {
(function(){${mapType.code}}.bind(items[i]))();
(function(){\n${mapType.code}\n}.bind(items[i]))();
}`;
}
}
Expand Down

0 comments on commit 52a7e06

Please sign in to comment.