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 #14319 Add parse float for steps less than 1 #14320

Closed
wants to merge 1 commit into from
Closed

Fix #14319 Add parse float for steps less than 1 #14320

wants to merge 1 commit into from

Conversation

kadencewp
Copy link
Contributor

Description

I added a check to see if the step property is set to less then 1. If so to change the newNumericValue variable to use parseFloat.

on line 51 changed this:

const newNumericValue = parseInt( newValue, 10 );

to this:

let newNumericValue = parseInt( newValue, 10 );
if ( props.step !== undefined && props.step < 1 ) {
	newNumericValue = parseFloat( newValue );
}

How has this been tested?

Checked with all core blocks, as well as all Kadence Blocks :)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@kadencewp
Copy link
Contributor Author

This should be dropped for #14322

This was only a way to make things work, 14322 is a real step forward.

@kadencewp kadencewp closed this Mar 7, 2019
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.

1 participant