From 2b54883d9cf79da6444f25bbc0de4f5fc9ecc244 Mon Sep 17 00:00:00 2001 From: Daniel Williams Date: Sun, 22 Oct 2023 12:17:31 +0100 Subject: [PATCH] fix: post message calls location.search which crashes react native --- code/lib/channels/src/postmessage/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/channels/src/postmessage/index.ts b/code/lib/channels/src/postmessage/index.ts index 312a8d756295..a49997fc3d32 100644 --- a/code/lib/channels/src/postmessage/index.ts +++ b/code/lib/channels/src/postmessage/index.ts @@ -103,7 +103,7 @@ export class PostMessageTransport implements ChannelTransport { const frames = this.getFrames(target); - const query = qs.parse(location.search, { ignoreQueryPrefix: true }); + const query = qs.parse(location?.search || '', { ignoreQueryPrefix: true }); const data = stringify( {