Skip to content

Commit

Permalink
forcing launch data to be base64 decoded now works with
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Campbell authored and Cameron Campbell committed Aug 19, 2024
1 parent 376c1d7 commit 1b70628
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildDocs/
docs/
docs_site/
node_modules/
assets/
./assets/
bun.lockb
tsconfig.tsbuildinfo
./build.ts
4 changes: 2 additions & 2 deletions src/helpers/deepLinkHelpers/parseDeepLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down

0 comments on commit 1b70628

Please sign in to comment.