Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic enum values lost when editing code #10239

Open
hovavo opened this issue Oct 21, 2024 · 0 comments
Open

Dynamic enum values lost when editing code #10239

hovavo opened this issue Oct 21, 2024 · 0 comments

Comments

@hovavo
Copy link

hovavo commented Oct 21, 2024

Dynamic enum values reset to 0 once a change was made in the code.

To Reproduce

  1. Go to https://makecode.com/playground#language-create-enums
  2. Click 'Run'
  3. 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
  4. Add an empty line at the end of the code
  5. Switch back to Blocks view
  6. The block displays the value Red (0), while the code shows otherwise
  7. When in actual projects, saving and reloading resets the value to 0 also in the code view resulting in real data loss
    Expected behavior
  8. Blocks and code values should be in sync
  9. Values should not be lost after reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant