Description
Is this a bug in companion itself or a module?
- I believe this to be a bug in companion
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
On the variables page, if a variable contains a json array of objects eg. [ {test: 1} ] , it cannot be collapsed otherwise it causes the page to display an error:
Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Btest%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
When visiting the url, the full text is:
Objects are not valid as a React child (found: object with keys {test}). If you meant to render a collection of children, use an array instead.
Seems like the value is somehow fed to React when it shouldn't be
This is irreversible and persists after page refresh. I have to close and restart Companion to reset the variable value
Steps To Reproduce
- Create a variable
$(custom:test)
- Create a button with a simple action
internal: Custom Variable: Set with expression
to set the variable with value[{test:1}]
- Go to the variables page and click on "Collapse variable view"
Expected Behavior
This should make the variable view take less space on screen
Environment (please complete the following information)
- OS: Windows
- Browser: Microsoft Edge
- Companion Version: v3.5.3+7770-stable-df70e20b
Additional context
No response