share: copy even if can't share (fix #925)

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/929/head
Varun Patil 2023-11-18 08:56:07 -08:00
parent 4005a21b2d
commit 2a3507d5fd
1 changed files with 4 additions and 4 deletions

View File

@ -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() {