fix: cast string to Number when setting attribute (#21)

Co-authored-by: zishan <zishan.khan@roularta.be>
This commit is contained in:
Mahammed Zishan Khan 2022-02-01 18:23:37 +01:00 committed by GitHub
parent e3a976fe7a
commit b7c236376b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -80,6 +80,10 @@ caching time of 12 hours obviously makes no sense.
## Changelog
### 1.2.1 - 2022-02-01
* Fix issue with limit in Gutenberg block.
### 1.2.0 - 2022-01-23
* Requires WordPress 4.7 or above

View File

@ -152,7 +152,7 @@
disabled: props.attributes.unlimited,
value: props.attributes.limit,
onChange: function( val ) {
props.setAttributes( { limit: val } );
props.setAttributes( { limit: Number( val ) } );
},
}
),