share: don't duplicate if at least one

pull/474/head
Varun Patil 2023-03-10 17:25:45 -08:00
parent c43010312f
commit 4ca57bbbe1
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ export default defineComponent({
if (immediate) { if (immediate) {
let share = let share =
this.shares.find((s) => !s.hasPassword) || this.shares.find((s) => !s.hasPassword) ||
(await this.createLink(false)); (this.shares.length === 0 ? await this.createLink(false) : null);
if (share) { if (share) {
if ("share" in window.navigator) { if ("share" in window.navigator) {