Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 052a4a9

Browse files
alexeagletinayuangao
authored andcommitted
fix(closure-compiler): use Number to cast (#289)
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.
1 parent a3f2a83 commit 052a4a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/utils/auto-prefixer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,6 @@ export function toBoxDirection(flexDirection = 'row') {
143143

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

0 commit comments

Comments
 (0)