Skip to content

Commit

Permalink
Fix too much recursion when using dynamically resized stage
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Feb 20, 2022
1 parent 0798226 commit 9cdada0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/scaffolding/scaffolding.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,11 @@ class Scaffolding extends EventTarget {
}
// TODO: remove when https://github.com/TurboWarp/packager/issues/213 is fixed
this.vm.on('STAGE_SIZE_CHANGED', (width, height) => {
this.width = width;
this.height = height;
this.relayout();
if (this.width !== width || this.height !== height) {
this.width = width;
this.height = height;
this.relayout();
}
});

this.cloudManager = new Cloud.CloudManager(this);
Expand Down

0 comments on commit 9cdada0

Please sign in to comment.