Skip to content

Commit

Permalink
fix: NumberConverter now accept an array sized 1
Browse files Browse the repository at this point in the history
  • Loading branch information
kyasbal committed Feb 24, 2017
1 parent 0190032 commit dedcd73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Converters/NumberConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ export default function NumberConverter(val: any): number {
return Number.parseFloat(val);
} else if (val === null) {
return null;
} else if (Array.isArray(val) && val.length === 1) {
return val[0];
}
}

0 comments on commit dedcd73

Please sign in to comment.