Skip to content

Commit

Permalink
fix(share): safeguard navigator object access in isShareSupported
Browse files Browse the repository at this point in the history
  • Loading branch information
igordanchenko committed May 15, 2023
1 parent 77e5583 commit 950a74a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/share/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function isShareSupported() {
return Boolean(navigator.canShare);
return typeof navigator !== "undefined" && Boolean(navigator?.canShare);
}

0 comments on commit 950a74a

Please sign in to comment.