diff --git a/simple-mind-map/src/utils/index.js b/simple-mind-map/src/utils/index.js index a5adb6db..04a6dc24 100644 --- a/simple-mind-map/src/utils/index.js +++ b/simple-mind-map/src/utils/index.js @@ -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() -} \ No newline at end of file +}