From adf043deee1ddd559f5361b0718df0a457ae1ab9 Mon Sep 17 00:00:00 2001 From: "jialong.yu" Date: Fri, 31 Dec 2021 16:15:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E5=9B=BE=E7=89=87=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/codemirror.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/codemirror.vue b/src/components/codemirror.vue index 9311b0e..d07f6a2 100644 --- a/src/components/codemirror.vue +++ b/src/components/codemirror.vue @@ -312,7 +312,7 @@ export default { try { imgList = eval(result) } catch (error) {} - if (imgList.length) firtImg = imgList[0] + if (imgList && imgList.length) firtImg = imgList[0] // 如果是下载图片的代码,则要显示图片和运行结果,不用显示对错,换成显示下载图片 if (photo) { this.isError = '' // 对错隐藏