diff --git a/src/common/SortedList.ts b/src/common/SortedList.ts index 051c6702..975dc204 100644 --- a/src/common/SortedList.ts +++ b/src/common/SortedList.ts @@ -35,6 +35,9 @@ export class SortedList { } const key = this._getKey(value); let i = this._search(key, 0, this._array.length - 1); + if (i === -1) { + return false; + } if (this._getKey(this._array[i]) !== key) { return false; }