Skip to content

Commit 60888d4

Browse files
authored
fix: typescript type of isIOS constant (#5163)
1 parent 235906c commit 60888d4

File tree

1 file changed

+2
-2
lines changed
  • packages/shared/utils

1 file changed

+2
-2
lines changed

packages/shared/utils/is.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export const hasOwn = <T extends object, K extends keyof T>(val: T, key: K): key
2323

2424
export const isIOS = /* #__PURE__ */ getIsIOS()
2525

26-
function getIsIOS() {
27-
return isClient && window?.navigator?.userAgent && (
26+
function getIsIOS(): boolean {
27+
return isClient && !!window?.navigator?.userAgent && (
2828
(/iP(?:ad|hone|od)/.test(window.navigator.userAgent))
2929
// The new iPad Pro Gen3 does not identify itself as iPad, but as Macintosh.
3030
// https://github.com/vueuse/vueuse/issues/3577

0 commit comments

Comments
 (0)