Update index.js

This commit is contained in:
Harris Zhang 2022-07-26 19:12:47 +08:00 committed by GitHub
parent c6438668f2
commit b00d5f6adb

View File

@ -178,7 +178,7 @@ export const imgToDataUrl = (src) => {
// 图片绘制到canvas里
ctx.drawImage(img, 0, 0, img.width, img.height)
resolve(canvas.toDataURL())
} catch (error) {
} catch (e) {
reject(e)
}
}
@ -243,4 +243,4 @@ export const asyncRun = (taskList, callback = () => {}) => {
}, 0)
}
loop()
}
}