Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
destroy annotaions first
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis1282 committed Jan 13, 2024
1 parent f403369 commit 3b749bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/stores/AppStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,13 +875,15 @@ export default types
const children = [];

walk(self, (node) => {
if (!isRoot(node) && getParent(node) === self) children.push(node);
if (!isRoot(node) && getParent(node) === self) {
if (node.annotations) children.unshift(...node.annotations);
else children.push(node);
}
});

let node;

while ((node = children?.shift())) {
console.log(node.annotations?.[0].trackedState.areas);
try {
destroy(node);
} catch (e) {
Expand Down

0 comments on commit 3b749bc

Please sign in to comment.