Skip to content

Commit

Permalink
fix(closure-compiler): use Number to cast (#289)
Browse files Browse the repository at this point in the history
parseInt requires two arguments within Google (the second is the radix)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt:
"Always specify this parameter"

Casting with Number('1') is better.
  • Loading branch information
alexeagle authored and tinayuangao committed May 24, 2017
1 parent a3f2a83 commit 052a4a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/utils/auto-prefixer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@ export function toBoxDirection(flexDirection = 'row') {

/** Convert flex order to Box ordinal group */
export function toBoxOrdinal(order = '0') {
let value = order ? parseInt(order) + 1 : 1;
let value = order ? Number(order) + 1 : 1;
return isNaN(value) ? "0" : value.toString();
}

0 comments on commit 052a4a9

Please sign in to comment.