mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
2.2.10
This commit is contained in:
@@ -15,4 +15,15 @@ export class WeakArray<T extends object> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
removeObjects(objectsToRemove: Set<T>) {
|
||||
this.weakArray = this.weakArray.filter((ref) => {
|
||||
const obj = ref.deref();
|
||||
return obj && !objectsToRemove.has(obj);
|
||||
});
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.weakArray = [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user