Skip to content

Commit

Permalink
fix: post message calls location.search which crashes react native
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyhw committed Oct 22, 2023
1 parent ab8d966 commit 2b54883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/lib/channels/src/postmessage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down

0 comments on commit 2b54883

Please sign in to comment.