Fix too much recursion when using dynamically resized stage

This commit is contained in:
Thomas Weber committed 2022-02-20 17:55:52 -06:00
1 parent 079822665a
commit 9cdada0030
1 file changed
+5 -3
+5 -3
View File
@@ -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);