Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed Node#root
  • Loading branch information
brighthas committed Oct 16, 2013
1 parent d0bd331 commit 8d27f56
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions index.js
Expand Up @@ -370,9 +370,14 @@ Object.defineProperties(o, {
get : function () {
var root = this.parent;
while (root) {
root = root.parent;
var parent = root.parent;
if(parent){
root = parent;
}else{
return root;
}
}
return root || this;
return this;
}
},

Expand Down

0 comments on commit 8d27f56

Please sign in to comment.