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

fix: ensure number ignoring string empty #2523

Open
wants to merge 2 commits into
base: v5
Choose a base branch
from

Conversation

CKY-
Copy link
Collaborator

@CKY- CKY- commented Apr 23, 2024

Description of the Change

added check for if not string empty because Number('') = 0 and is finite
would return 0 ignoring the default out

Applicable Issues

#2522

Testing

ran tests for

current behavior
$ensureNumber[$arg[1],1] = 0
$ensureNumber[test,1] = 1
$ensureNumber[$null,1] = 0
$ensureNumber[20,1] = 20
expected

$ensureNumber[$arg[1],1] = 1
$ensureNumber[test,1] = 1
$ensureNumber[$null,1] = 1
$ensureNumber[20,1] = 20

Screenshots

@CKY- CKY- requested a review from ebiggz as a code owner April 23, 2024 07:49
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.

None yet

1 participant