mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: cast integer on truthy value and not only true
allows castInteger="true" to work
This commit is contained in:
parent
5a992fe5e7
commit
86b8f6b238
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ export default Ember.Mixin.create({
|
|||
},
|
||||
|
||||
_castInteger(value) {
|
||||
if (this.get("castInteger") === true && Ember.isPresent(value) && this._isNumeric(value)) {
|
||||
if (this.get("castInteger") && Ember.isPresent(value) && this._isNumeric(value)) {
|
||||
return parseInt(value, 10);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue