Fix SortedList.values iteration and general dec lifecycle fixes

Fixes #4652
This commit is contained in:
Daniel Imms
2023-08-13 10:42:45 -07:00
parent 5890029f71
commit 70f6fa2bc9
6 changed files with 26 additions and 25 deletions
+2 -1
View File
@@ -89,7 +89,8 @@ export class SortedList<T> {
}
public values(): IterableIterator<T> {
return this._array.values();
// Duplicate the array to avoid issues when _array changes while iterating
return [...this._array].values();
}
private _search(key: number): number {