Skip to content

Commit

Permalink
Fix: Move expression out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Apoorvgarg-creator committed Oct 31, 2023
1 parent 3bf777f commit 4e29704
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/block_svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1183,11 +1183,11 @@ export class BlockSvg
bringToFront(blockOnly = false) {
/* eslint-disable-next-line @typescript-eslint/no-this-alias */
let block: this | null = this;
const isDeadOrDying: boolean = block.isDeadOrDying();
if (isDeadOrDying) {
return;
}
do {
const isDeadOrDying: boolean = block.isDeadOrDying();
if (isDeadOrDying) {
break;
}
const root = block.getSvgRoot();
const parent = root.parentNode;
const childNodes = parent!.childNodes;
Expand Down

0 comments on commit 4e29704

Please sign in to comment.