From e414916556ef7a97a00fadf39fdeb4e03419f748 Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Mon, 14 Mar 2022 05:50:49 +0700 Subject: [PATCH] Improve wish import link regex --- src/routes/wish/import.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routes/wish/import.svelte b/src/routes/wish/import.svelte index b2a5338d..2aba01c3 100644 --- a/src/routes/wish/import.svelte +++ b/src/routes/wish/import.svelte @@ -153,6 +153,9 @@ try { if (selectedType === 'android') { + const urlString = genshinLink.match(/https:\/\/.*#/g); + url = new URL(urlString); + } else if (selectedType === 'pclog') { const urlString = genshinLink.match(/https:\/\/.*\//g); url = new URL(urlString); } else { @@ -220,6 +223,7 @@ } currentBanner = type.name; + console.log(url); const weapons = Object.values(weaponList); const chars = Object.values(characters);