Skip to content

Commit e8ca823

Browse files
authored
Merge pull request #6 from kitgary/fix-ch03-Node
Update Node.js
2 parents ad8a160 + f5932f4 commit e8ca823

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ch03/model/Node.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exports.Node = class Node {
1414
}
1515

1616
isRoot() {
17-
return isValid(this._parent);
17+
return !isValid(this._parent);
1818
}
1919

2020
get children() {
@@ -43,4 +43,4 @@ exports.Node = class Node {
4343
return `Node (val: ${this._val}, children:
4444
${this._children.length})`;
4545
}
46-
};
46+
};

0 commit comments

Comments
 (0)