mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
FIX: cast integer on truthy value and not only true
allows castInteger="true" to work
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user