From 1b7062853616f90e955b496b323af4656dda8d3c Mon Sep 17 00:00:00 2001 From: Cameron Campbell Date: Mon, 19 Aug 2024 14:22:17 +0100 Subject: [PATCH] forcing launch data to be base64 decoded now works with --- .npmignore | 2 +- src/helpers/deepLinkHelpers/parseDeepLink.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.npmignore b/.npmignore index 7149150..f6673f0 100644 --- a/.npmignore +++ b/.npmignore @@ -4,7 +4,7 @@ buildDocs/ docs/ docs_site/ node_modules/ -assets/ +./assets/ bun.lockb tsconfig.tsbuildinfo ./build.ts \ No newline at end of file diff --git a/src/helpers/deepLinkHelpers/parseDeepLink.ts b/src/helpers/deepLinkHelpers/parseDeepLink.ts index e80b574..a3982e1 100644 --- a/src/helpers/deepLinkHelpers/parseDeepLink.ts +++ b/src/helpers/deepLinkHelpers/parseDeepLink.ts @@ -55,8 +55,8 @@ const parseLaunchData = (launchData: string | null | undefined, decodeBase64?: b if (!launchData) return null launchData = decodeURIComponent(launchData) - if (decodeBase64 === undefined || decodeBase64 === true) { - if (base64Regex.test(launchData)) launchData = atob(launchData) + if (decodeBase64 === undefined || decodeBase64) { + if (decodeBase64 || base64Regex.test(launchData)) launchData = atob(launchData) } try { return JSON.parse(launchData) }