Fix SortedList.values iteration and general dec lifecycle fixes
Fixes #4652
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user