From ea4aab7ea8499d54128eb81209d0b96a2798a111 Mon Sep 17 00:00:00 2001 From: qiang Date: Mon, 17 Oct 2022 17:07:36 +0800 Subject: [PATCH] fix(mp-baidu): triggerEvent Cannot read property 'catchhook:created' of undefined --- .../packages/mp-vue/dist/mp.runtime.esm.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js b/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js index e496d7058..4d2328025 100644 --- a/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js +++ b/packages/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js @@ -5850,9 +5850,13 @@ function internalMixin(Vue) { if (this.$scope && event) { var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent']; if (triggerEvent) { - triggerEvent.call(this.$scope, event, { - __args__: toArray(arguments, 1) - }); + try { + triggerEvent.call(this.$scope, event, { + __args__: toArray(arguments, 1) + }); + } catch (error) { + + } } } return oldEmit.apply(this, arguments) -- GitLab