Closed ellthompson closed 1 year ago
I just tried and failed to reproduce that error in the booleaninput.html example. How do I get this to happen?
This error was thrown in the examples browser using the latest version of PCUI, which is processed using the typescript rollup plugin.
Just to clarify here - you mean the PlayCanvas Engine Examples Browser (this repo has an examples browser too now). :smile:
So why would that app do that, but not the PCUI examples browser (which is vanilla ESM)?
Was preventExtensions
called in the compiled code perhaps?
Yep the engine examples browser. It doesn't seem to call preventExtensions anywhere though.
Have you traced through the compiled JS code to see what's going on? There genuinely shouldn't be anything wrong with the code you're changing here, as far as I can tell.
It looks like this issue was caused by the LabelGroup component passing react component properties directly into the constructor of the LabelGroup field. These properties should be copied to a mutable object beforehand. I've included that fix as part of the LabelGroup change here, so I'm closing this issue.
The args object should not be modified before it is copied otherwise the following error is thrown:
This PR first copies the args object before updating this value., following the example in the Panel class.