Skip to content

Commit

Permalink
Merge pull request #24545 from storybookjs/dannyhw/fix-post-message-c…
Browse files Browse the repository at this point in the history
…rashes-react-native

Core: Fix post message channel location.search access for React Native
  • Loading branch information
shilman authored Oct 22, 2023
2 parents ab8d966 + 2b54883 commit 9657882
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 9657882

Please sign in to comment.