From 5659fdff52ea24593a35e2fa701fa91f9e4078de Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 27 Feb 2020 12:50:06 +0800 Subject: [PATCH] fix(cli): compatible with cnpm --- packages/uni-template-compiler/lib/util.js | 2 +- src/platforms/mp-alipay/runtime/wrapper/component-parser.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/uni-template-compiler/lib/util.js b/packages/uni-template-compiler/lib/util.js index 49ecde3fe..e8815049a 100644 --- a/packages/uni-template-compiler/lib/util.js +++ b/packages/uni-template-compiler/lib/util.js @@ -176,7 +176,7 @@ function hasOwn (obj, key) { return hasOwnProperty.call(obj, key) } -const tags = require('../../uni-cli-shared/lib/tags') +const tags = require('@dcloudio/uni-cli-shared/lib/tags') const { getTagName diff --git a/src/platforms/mp-alipay/runtime/wrapper/component-parser.js b/src/platforms/mp-alipay/runtime/wrapper/component-parser.js index 5d8a9be97..1aa645e0a 100644 --- a/src/platforms/mp-alipay/runtime/wrapper/component-parser.js +++ b/src/platforms/mp-alipay/runtime/wrapper/component-parser.js @@ -109,7 +109,7 @@ export default function parseComponent (vueComponentOptions) { } }, didUnmount () { - this.$vm.$destroy() + this.$vm && this.$vm.$destroy() }, methods: { __r: handleRef, -- GitLab