diff --git a/src/shared/util.js b/src/shared/util.js index 709fe146..b6b3eb5d 100644 --- a/src/shared/util.js +++ b/src/shared/util.js @@ -56,7 +56,7 @@ export function isRegExp (v: any): boolean { * Check if val is a valid array index. */ export function isValidArrayIndex (val: any): boolean { - const n = parseFloat(val) + const n = parseFloat(String(val)) return n >= 0 && Math.floor(n) === n && isFinite(val) }