Skip to content

Commit

Permalink
share: copy even if can't share (fix #925)
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <[email protected]>
  • Loading branch information
pulsejet committed Nov 18, 2023
1 parent 4005a21 commit 2a3507d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/modal/NodeShareModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ export default defineComponent({
async shareOrCopy(url: string) {
if (nativex.has()) {
await nativex.shareUrl(url);
} else if ('share' in window.navigator) {
await this.copy(url);
await window.navigator.share({ title: this.filename, url: url });
return await nativex.shareUrl(url);
}
await this.copy(url);
await window.navigator?.share?.({ title: this.filename, url: url });
},
cleanup() {
Expand Down

0 comments on commit 2a3507d

Please sign in to comment.