Skip to content

Commit 0b0c188

Browse files
authored
fix(share): use copy link on desktop (#1477)
1 parent 61ad118 commit 0b0c188

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/utils/share.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { browser } from "$app/environment";
2+
import { isDesktop } from "./isDesktop";
23

34
export async function share(url: string, title: string, appendLeafId: boolean = false) {
45
if (!browser) return;
@@ -13,7 +14,7 @@ export async function share(url: string, title: string, appendLeafId: boolean =
1314
url = shareUrl.toString();
1415
}
1516

16-
if (navigator.share) {
17+
if (navigator.share && !isDesktop(window)) {
1718
navigator.share({ url, title });
1819
} else {
1920
if (document.hasFocus()) {

0 commit comments

Comments
 (0)