Skip to content

Commit

Permalink
Added check for sizes when building a new Block (fixes #776)
Browse files Browse the repository at this point in the history
  • Loading branch information
w00fz committed Sep 2, 2015
1 parent 6f9f6f4 commit 4e80662
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion platforms/common/application/lm/blocks/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var Block = new prime({

constructor: function(options) {
Base.call(this, options);
this.setAttribute('size', precision(options.attributes.size, 1));
if (options.attributes && options.attributes.size) this.setAttribute('size', precision(options.attributes.size, 1));

this.on('changed', this.hasChanged);
},
Expand Down
2 changes: 1 addition & 1 deletion platforms/common/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ var Block = new prime({

constructor: function(options) {
Base.call(this, options);
this.setAttribute('size', precision(options.attributes.size, 1));
if (options.attributes && options.attributes.size) this.setAttribute('size', precision(options.attributes.size, 1));

this.on('changed', this.hasChanged);
},
Expand Down

0 comments on commit 4e80662

Please sign in to comment.