Skip to content

Commit

Permalink
Update updateAttributes, prevent a crash with an empty attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Sep 3, 2017
1 parent a782350 commit 0dfa656
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/grapes.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "grapesjs",
"description": "Free and Open Source Web Builder Framework",
"version": "0.9.48",
"version": "0.9.49",
"author": "Artur Arseniev",
"license": "BSD-3-Clause",
"homepage": "http://grapesjs.com",
Expand Down
3 changes: 2 additions & 1 deletion src/dom_components/view/ComponentView.js
Expand Up @@ -152,8 +152,9 @@ module.exports = Backbone.View.extend({
var attributes = {},
attr = model.get("attributes");
for(var key in attr) {
if(attr.hasOwnProperty(key))
if (key && attr.hasOwnProperty(key)) {
attributes[key] = attr[key];
}
}

// Update src
Expand Down

0 comments on commit 0dfa656

Please sign in to comment.