Skip to content

Commit 9cdada0

Browse files
committed
Fix too much recursion when using dynamically resized stage
1 parent 0798226 commit 9cdada0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/scaffolding/scaffolding.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,11 @@ class Scaffolding extends EventTarget {
324324
}
325325
// TODO: remove when https://github.com/TurboWarp/packager/issues/213 is fixed
326326
this.vm.on('STAGE_SIZE_CHANGED', (width, height) => {
327-
this.width = width;
328-
this.height = height;
329-
this.relayout();
327+
if (this.width !== width || this.height !== height) {
328+
this.width = width;
329+
this.height = height;
330+
this.relayout();
331+
}
330332
});
331333

332334
this.cloudManager = new Cloud.CloudManager(this);

0 commit comments

Comments
 (0)