Skip to content

Commit

Permalink
Merge pull request #2 from gaia-components/bug1140281
Browse files Browse the repository at this point in the history
Bug 1140281: allow the tree to be unrendered when root is null
  • Loading branch information
DouglasSherk committed Mar 6, 2015
2 parents 5b1fdca + 421a0b1 commit 6cb7cf1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gaia-dom-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ module.exports = component.register('gaia-dom-tree', {
},

render: function() {
if (!this.root) { return; }

var tree = this.createTree(this.root);
this.els.tree.innerHTML = '';
this.els.tree.appendChild(tree);
debug('rendered');
if (this.root) {
var tree = this.createTree(this.root);
this.els.tree.appendChild(tree);
debug('rendered');
}
},

select: function(el) {
Expand Down

0 comments on commit 6cb7cf1

Please sign in to comment.