Cannot load projects if current project uses cloud variables
SheepTester opened this issue · 0 comments
ref: adam on instagram
gui TypeError: Cannot create property 'onclose' on boolean 'true'
at CloudProvider.value (gui.min.js:1)
at n.value (gui.min.js:1)
at n.value (gui.min.js:1)
at n.e (lib.min.js:12)
at n.r.emit (lib.min.js:24)
at t.<anonymous> (lib.min.js:157)
at t.r.emit (lib.min.js:24)
at t.value (lib.min.js:83)
at n.value (lib.min.js:157)
at n.value (lib.min.js:157)
This sets connection
to true, which is all fine and dandy because _openConnection
isn't called so no properties are being set on it (reading properties of true
is fine though).
scratch-gui/src/lib/cloud-provider.js
Line 45 in b466e09
However, there are two cases where properties will still get set on true. When changing the cloud IP via special cloud behaviours:
scratch-gui/src/lib/cloud-provider.js
Lines 267 to 271 in b466e09
and when closing the connection:
scratch-gui/src/lib/cloud-provider.js
Lines 357 to 365 in b466e09
The latter only happens when there's already a project using cloud variables, so when you load a new project, I guess it first requests to close the connection, and an error is thrown preventing the new project from loading
And of course, this requires that the cloud host remains unset