Skip to content

Commit 6ad77ee

Browse files
authored
Merge pull request #7 from software-mansion-labs/fix/decode-referrer
fix: decode-referrer
2 parents 5bb36e4 + a9098ea commit 6ad77ee

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/api/getDeferredLink.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ export const getDeferredLink = async ({
4343
referrer = null;
4444
}
4545

46-
const matchClickId = referrer?.match(/(?:^|&)click_id=([^&]+)/);
46+
const decodedReferrer = decodeURIComponent(referrer ?? '');
47+
const matchClickId = decodedReferrer.match(/(?:^|&)click_id=([^&]+)/);
4748
const referrerClickId = matchClickId ? matchClickId[1] : null;
4849

4950
let response;

0 commit comments

Comments
 (0)