Skip to content

Commit

Permalink
bug: Fixed exposeFunction not being awaited
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Dax committed Oct 14, 2022
1 parent e8eebb4 commit 6c80514
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/storycap/src/node/capturing-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class CapturingBrowser extends StoryPreviewBrowser {
getCurrentVariantKey: () => this.currentVariantKey,
waitBrowserMetricsStable: () => this.waitBrowserMetricsStable('preEmit'),
};
Object.entries(exposed).forEach(([k, f]) => this.page.exposeFunction(k, f));
await Promise.all(Object.entries(exposed).map(([k, f]) => this.page.exposeFunction(k, f)));
}

private async reload() {
Expand Down

0 comments on commit 6c80514

Please sign in to comment.