From bc24dab84ed8148ae4a04ff751f23691bce3a898 Mon Sep 17 00:00:00 2001 From: dongqing Date: Thu, 5 Dec 2019 09:54:40 +0800 Subject: [PATCH] fix --- painter.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/painter.js b/painter.js index 5caa934..786cc84 100644 --- a/painter.js +++ b/painter.js @@ -66,7 +66,7 @@ Component({ action: { type: Object, observer: function (newVal, oldVal) { - if (newVal) { + if (newVal && !this.isEmpty(newVal)) { this.doAction(newVal, (callbackInfo) => { this.movingCache = callbackInfo }, false, true) @@ -268,7 +268,7 @@ Component({ } if (newVal && newVal.url && doView.url && newVal.url !== doView.url) { downloader.download(newVal.url, this.properties.LRU).then((path) => { - if (newVal.url.startsWidth('https')) { + if (newVal.url.startsWith('https')) { doView.originUrl = newVal.url } doView.url = path; @@ -283,8 +283,9 @@ Component({ this.reDraw(doView, callback, isMoving) } }) - }).catch(() => { + }).catch((error) => { // 未下载成功,直接绘制 + console.error(error) this.reDraw(doView, callback, isMoving) }) } else {