diff --git a/src/routes/settings/Restore.tsx b/src/routes/settings/Restore.tsx index e5b0683..34cb3e3 100644 --- a/src/routes/settings/Restore.tsx +++ b/src/routes/settings/Restore.tsx @@ -96,7 +96,7 @@ function TwelveWordsEntry() { async function handlePaste() { try { - let text; + let text: string; if (Capacitor.isNativePlatform()) { const { value } = await Clipboard.read(); @@ -111,7 +111,7 @@ function TwelveWordsEntry() { } // split words on space or newline - const words = text.split(/[\s\n]+/); + const words = text.trim().split(/[\s\n]+/); if (words.length !== 12) { return showToast(