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 3d710f7a37928fdf11b5612811cbf54de64fbcf5..f398d6f1165cde13f9cc0cc88fa8f7e6f959f7a0 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) }