fix: prevent crash when clicking on a field to delete a block (#7621)

* Fix: #7587

* Fix: Lint error

* Fix: Move expression out of loop

* Fix: No need to use temp variable
This commit is contained in:
Apoorv Garg
2023-11-01 22:29:21 +05:30
committed by GitHub
parent 5322078056
commit 10024bd54e

View File

@@ -1183,6 +1183,9 @@ export class BlockSvg
bringToFront(blockOnly = false) {
/* eslint-disable-next-line @typescript-eslint/no-this-alias */
let block: this | null = this;
if (block.isDeadOrDying()) {
return;
}
do {
const root = block.getSvgRoot();
const parent = root.parentNode;