fix: disposing of a workspace that has overwritten shadows (#6424)

* fix: disposing of a workspace that has overwritten shadows

* fix: try slightly different placement to fix tests

* fix: add disposing parameter to guaruntee consistent behavior

* chore: wrap properties in a isDeadOrDying method

* chore: make disposing private
This commit is contained in:
Beka Westberg
2022-09-26 12:37:36 -07:00
committed by GitHub
parent 1b6a5d9bb5
commit f2e408b6fa
9 changed files with 42 additions and 29 deletions

View File

@@ -249,7 +249,7 @@ function deleteNext_(deleteList: BlockSvg[], eventGroup: string) {
eventUtils.setGroup(eventGroup);
const block = deleteList.shift();
if (block) {
if (!block.disposed) {
if (!block.isDeadOrDying()) {
block.dispose(false, true);
setTimeout(deleteNext_, DELAY, deleteList, eventGroup);
} else {