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) {
let share =
this.shares.find((s) => !s.hasPassword) ||
(await this.createLink(false));
(this.shares.length === 0 ? await this.createLink(false) : null);
if (share) {
if ("share" in window.navigator) {