pxt
pxt copied to clipboard
Dynamic enum values lost when editing code
Dynamic enum values reset to 0 once a change was made in the code.
To Reproduce
- Go to https://makecode.com/playground#language-create-enums
- Click 'Run'
- Add a 'Show $color' block from the 'Language' menu and give it a non-zero value (Blue or Yellow) 4.Switch to the JavaScript view
- Add an empty line at the end of the code
- Switch back to Blocks view
- The block displays the value Red (0), while the code shows otherwise
- When in actual projects, saving and reloading resets the value to 0 also in the code view resulting in real data loss Expected behavior
- Blocks and code values should be in sync
- Values should not be lost after reload