Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Jun 9, 2018
1 parent 3d01b27 commit bfc9037
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/editor/model/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ module.exports = Backbone.Model.extend({
this.set('storables', []);

if (c.el && c.fromElement) this.config.components = c.el.innerHTML;
this.attrsOrig = [...c.el.attributes].reduce((res, next) => {
res[next.nodeName] = next.nodeValue;
return res;
}, {});
this.attrsOrig = c.el
? [...c.el.attributes].reduce((res, next) => {
res[next.nodeName] = next.nodeValue;
return res;
}, {})
: '';

// Load modules
deps.forEach(name => this.loadModule(name));
Expand Down

0 comments on commit bfc9037

Please sign in to comment.