Skip to content

Boolean in Utilities has unintended functionality due to Casting. #1986

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

Open
NexusKitten opened this issue Feb 27, 2025 · 2 comments
Open

Boolean in Utilities has unintended functionality due to Casting. #1986

NexusKitten opened this issue Feb 27, 2025 · 2 comments

Comments

@NexusKitten
Copy link
Contributor

NexusKitten commented Feb 27, 2025

The following block has possibly unintended functionality due to not casting the input to a boolean before returning:

stringToBoolean({ STRING }) {
return STRING;
}

@NexusKitten NexusKitten changed the title Utilities.js doesn't use the Scratch.Cast API Boolean in Utilities has unintended functionality due to Casting. Feb 27, 2025
@CST1229
Copy link
Collaborator

CST1229 commented Feb 27, 2025

could just be acting as a coupler? not really a cast

@NexusKitten
Copy link
Contributor Author

could just be acting as a coupler? not really a cast

It is acting as a coupler. Regardless, it doesn't make much sense for a boolean to return anything other than true/false

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

2 participants