mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 19:29:51 +00: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
@ -28,7 +28,7 @@ export default Ember.Mixin.create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_castInteger(value) {
|
_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);
|
return parseInt(value, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user