From 49e24817b4b5975e6c48f482fb477d357f6898b9 Mon Sep 17 00:00:00 2001 From: handongxun Date: Mon, 29 Jun 2020 11:34:27 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BC=98=E5=8C=96=20getSubNVueById?= =?UTF-8?q?=20=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/platforms/app-plus/service/api/plugin/sub-nvue.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platforms/app-plus/service/api/plugin/sub-nvue.js b/src/platforms/app-plus/service/api/plugin/sub-nvue.js index 3d710f7a..f398d6f1 100644 --- a/src/platforms/app-plus/service/api/plugin/sub-nvue.js +++ b/src/platforms/app-plus/service/api/plugin/sub-nvue.js @@ -62,7 +62,10 @@ function wrapper (webview) { } export function getSubNVueById (id) { - const webview = plus.webview.getWebviewById(id) + const webview = plus.webview.getWebviewById(id) + if (webview === null || webview === undefined) { + throw new Error('Unable to find SubNVue, id=' + id) + } if (webview && !webview.$processed) { wrapper(webview) } -- GitLab