This commit is contained in:
haad
2016-03-06 16:56:02 +01:00
parent c776aa677e
commit f112e52745
3 changed files with 5 additions and 5 deletions

View File

@@ -8,4 +8,4 @@ const ItemTypes = {
Link: "link"
};
module.exports = ItemTypes;
module.exports = ItemTypes;

View File

@@ -61,7 +61,7 @@ class List {
seq: this.seq,
ver: this.ver,
items: this._currentBatch.map((f) => f.asJson)
}
};
}
/* Static methods */

View File

@@ -18,16 +18,16 @@ class Node {
}
get asJson() {
return { id: this.id, seq: this.seq, ver: this.ver, data: this.data, next: this.next }
return { id: this.id, seq: this.seq, ver: this.ver, data: this.data, next: this.next };
}
static equals(a, b) {
return a.id == b.id && a.seq == b.seq && a.ver == b.ver;
return a.id === b.id && a.seq === b.seq && a.ver === b.ver;
}
hasChild(a) {
const id = a.compactId;
for(let i = 0; i < this.next.length; i ++) {
for(let i = 0; i < this.next.length; i++) {
if(this.next[i] === id)
return true;
}