Skip to content

Commit

Permalink
Return promisefor page.evaluate
Browse files Browse the repository at this point in the history
  • Loading branch information
indigolain committed Mar 15, 2024
1 parent b5874d3 commit 6f46f11
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/storycrawler/src/browser/stories-browser.ts
Expand Up @@ -88,10 +88,9 @@ export class StoriesBrowser extends BaseBrowser {
if (api === undefined) return;

if (isPreviewApi(api)) {
api.storyStoreValue && api.storyStoreValue.cacheAllCSFFiles();
return;
return api.storyStoreValue && api.storyStoreValue.cacheAllCSFFiles();
}
api.storyStore?.cacheAllCSFFiles && api.storyStore.cacheAllCSFFiles();
return api.storyStore?.cacheAllCSFFiles && api.storyStore.cacheAllCSFFiles();
});
const result = await this.page.evaluate(() => {
function isPreviewApi(api: API | PreviewAPI): api is PreviewAPI {
Expand Down

0 comments on commit 6f46f11

Please sign in to comment.