From b00d5f6adb5c785bfabdae5e67286edd5337a6be Mon Sep 17 00:00:00 2001 From: Harris Zhang Date: Tue, 26 Jul 2022 19:12:47 +0800 Subject: [PATCH] Update index.js --- simple-mind-map/src/utils/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +}