web binding: fix equals()
Node.equals() used to always return true. Now it works. Also added unit tests for it.
This commit is contained in:
parent
2bf9c0113b
commit
7ef73b2e08
2 changed files with 21 additions and 5 deletions
|
|
@ -258,11 +258,7 @@ class Node {
|
|||
}
|
||||
|
||||
equals(other) {
|
||||
if (this === other) return true;
|
||||
for (let i = 0; i < 5; i++) {
|
||||
if (this[i] !== other[i]) return false;
|
||||
}
|
||||
return true;
|
||||
return this.id === other.id;
|
||||
}
|
||||
|
||||
child(index) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue