fix(common): pass radix 10 to parseInt in getSafariVersion
Safari major version parsing used parseInt without an explicit radix. Other call sites in the repo use base 10; add the radix for consistency and to avoid octal interpretation of leading-zero strings. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -41,7 +41,7 @@ export function getSafariVersion(): number {
|
|||||||
if (majorVersion === null || majorVersion.length < 2) {
|
if (majorVersion === null || majorVersion.length < 2) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return parseInt(majorVersion[1]);
|
return parseInt(majorVersion[1], 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the users platform. We use this to interpret the meta key
|
// Find the users platform. We use this to interpret the meta key
|
||||||
|
|||||||
Reference in New Issue
Block a user