Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/message-transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class PostMessageTransport implements Transport {
*/
constructor(
private eventTarget: Window = window.parent,
private eventSource?: MessageEventSource,
private eventSource: MessageEventSource,
) {
this.messageListener = (event) => {
if (eventSource && event.source !== this.eventSource) {
Expand Down
5 changes: 4 additions & 1 deletion src/react/useApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ export function useApp({

async function connect() {
try {
const transport = new PostMessageTransport(window.parent);
const transport = new PostMessageTransport(
window.parent,
window.parent,
);
const app = new App(appInfo, capabilities);

// Register handlers BEFORE connecting
Expand Down
Loading
Loading