Skip to content

Commit 49c3fb8

Browse files
committed
fix: fix: 优化截图返回值处理,支持返回数组格式 (我不是故意的啦)
1 parent 0be2ac7 commit 49c3fb8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • packages/karin-plugin-puppeteer/src

packages/karin-plugin-puppeteer/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ const main = async () => {
1515
const time = Date.now()
1616
const result = await browser.screenshot(data)
1717
logger.info(`[${name}][${path.basename(data.file)}] 截图完成 耗时: ${logger.green(Date.now() - time + '')} ms`)
18+
if (Array.isArray(result.data)) {
19+
return result.data
20+
}
21+
1822
return `base64://${result.data}` as any
1923
})
2024

0 commit comments

Comments
 (0)