FIX: cast integer on truthy value and not only true

allows castInteger="true" to work
This commit is contained in:
Joffrey JAFFEUX 2017-11-22 13:40:22 +01:00 committed by GitHub
parent 5a992fe5e7
commit 86b8f6b238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}