Skip to content

Commit

Permalink
fix(export): regression on normal export
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 22, 2024
1 parent 352fbc1 commit 2df02ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/slidev/node/commands/export.ts
Expand Up @@ -204,8 +204,10 @@ export async function exportSlides({
})
await page.waitForLoadState('networkidle')
await page.emulateMedia({ colorScheme: dark ? 'dark' : 'light', media: 'screen' })
const slide = page.locator(`[data-slidev-no="${no}"]`)
await slide.waitFor({ state: 'visible' })
const slide = no === 'print'
? page.locator('body')
: page.locator(`[data-slidev-no="${no}"]`)
await slide.waitFor()

// Wait for slides to be loaded
{
Expand Down

0 comments on commit 2df02ba

Please sign in to comment.