mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge pull request #3888 from Tyriar/3885
Prevent exception when deleting non-existent element
This commit is contained in:
@@ -35,6 +35,9 @@ export class SortedList<T> {
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user