Skip to content

fix: return previous color state from setColorsEnabled#3002

Merged
HerrCai0907 merged 2 commits intoAssemblyScript:mainfrom
cuiweixie:fix/set-colors-enabled-return-previous-state
Mar 28, 2026
Merged

fix: return previous color state from setColorsEnabled#3002
HerrCai0907 merged 2 commits intoAssemblyScript:mainfrom
cuiweixie:fix/set-colors-enabled-return-previous-state

Conversation

@cuiweixie
Copy link
Copy Markdown
Contributor

Summary

setColorsEnabled is documented to return the previous color-enable flag, but it assigned wasEnabled from the new isEnabled argument instead of the prior colorsEnabled value.

Change

  • Capture wasEnabled from colorsEnabled before updating it, so callers can restore the prior state correctly.

setColorsEnabled incorrectly assigned wasEnabled from the new value
instead of the previous colorsEnabled flag.
@HerrCai0907 HerrCai0907 merged commit 9ffcf25 into AssemblyScript:main Mar 28, 2026
14 checks passed
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

Successfully merging this pull request may close these issues.

2 participants