fix empty string insertion bug

This commit is contained in:
Kevin Jahns
2017-12-31 14:49:20 +01:00
parent f2debc150c
commit fc5be5c7cc
3 changed files with 13 additions and 2 deletions

View File

@@ -11,6 +11,10 @@ export default class ID {
return id !== null && id.user === this.user && id.clock === this.clock
}
lessThan (id) {
return this.user < id.user || (this.user === id.user && this.clock < id.clock)
if (id.constructor === ID) {
return this.user < id.user || (this.user === id.user && this.clock < id.clock)
} else {
return false
}
}
}