Skip to content

Commit 93f7a73

Browse files
author
farfromrefuge
committed
chore: refactor
1 parent 1ec73c6 commit 93f7a73

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ui-canvaslabel/canvaslabel.common.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,14 +546,12 @@ export class CanvasLabel extends CanvasView {
546546
private mTextSpan: SpanBase;
547547

548548
handlePropertyChange() {
549-
const shapes = this.shapes;
550-
shapes && shapes.forEach((s) => s instanceof SpanBase && s.reset());
549+
this.shapes?.forEach((s) => s instanceof SpanBase && s.reset());
551550
this.invalidate();
552551
}
553552

554553
onSizeChanged(w, h, oldw, oldh) {
555-
const shapes = this.shapes;
556-
shapes && shapes.forEach((s) => s instanceof SpanBase && s.resetLayout());
554+
this.shapes?.forEach((s) => s instanceof SpanBase && s.resetLayout());
557555
super.onSizeChanged(w, h, oldw, oldh);
558556
}
559557

0 commit comments

Comments
 (0)