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

Number input not defaulting to 0 when empty #3435

Open
cymplecy opened this issue Jan 22, 2025 · 4 comments
Open

Number input not defaulting to 0 when empty #3435

cymplecy opened this issue Jan 22, 2025 · 4 comments
Assignees
Labels

Comments

@cymplecy
Copy link
Contributor

https://forum.snap.berkeley.edu/t/substring-after/18538

@jmoenig jmoenig added the bug label Jan 22, 2025
@jmoenig jmoenig self-assigned this Jan 22, 2025
@jmoenig
Copy link
Owner

jmoenig commented Jan 22, 2025

yep, that's a bug, I think it can be fixed by simply filling in the missing zero in the very last input slot of this definition body script:

Image

That's what I'm planning to do. Any objections?

@cymplecy
Copy link
Contributor Author

The problem is that in previous versions (I tried 9.2.17), an input type declared as number would return 0 if called with an empty value

Whereas now it returns the empty value

There could be more of these lurking around

@brianharvey
Copy link
Collaborator

Oh, is this a side effect of the change to number parsing introduced for the sake of RANDOM?

@jmoenig
Copy link
Owner

jmoenig commented Jan 22, 2025

Yes, it is. Now I think I'm going to fix it in Snap! and leave the library as it is, so existing projects won't break...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants