Skip to content

Commit

Permalink
Merge pull request #632 from Mike-Dax/fix-expose-function
Browse files Browse the repository at this point in the history
bug: Fixed exposeFunction not being awaited
  • Loading branch information
Quramy authored Feb 2, 2023
2 parents 56b8eea + 6c80514 commit 62bcea3
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 62bcea3

Please sign in to comment.