From 8dae702aed3d1b6abb9fc4a3f7ea3a76f69df2ec Mon Sep 17 00:00:00 2001 From: qiang Date: Mon, 20 Apr 2020 18:28:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=83=85=E5=86=B5=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/runtime/wrapper/util.js | 2 +- src/platforms/mp-alipay/runtime/wrapper/util.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/runtime/wrapper/util.js b/src/core/runtime/wrapper/util.js index f7a086ca6..83a63a291 100644 --- a/src/core/runtime/wrapper/util.js +++ b/src/core/runtime/wrapper/util.js @@ -287,7 +287,7 @@ function wrapper (event) { event.target = event.target || {} - if (!hasOwn(event, 'detail')) { + if (!hasOwn(event, 'detail') || !event.detail) { event.detail = {} } diff --git a/src/platforms/mp-alipay/runtime/wrapper/util.js b/src/platforms/mp-alipay/runtime/wrapper/util.js index 69d91c489..a69b24866 100644 --- a/src/platforms/mp-alipay/runtime/wrapper/util.js +++ b/src/platforms/mp-alipay/runtime/wrapper/util.js @@ -59,7 +59,7 @@ export function initSpecialMethods (mpInstance) { specialMethods.forEach(method => { if (isFn(mpInstance.$vm[method])) { mpInstance[method] = function (event) { - if (!hasOwn(event, 'detail')) { + if (!hasOwn(event, 'detail') || !event.detail) { event.detail = {} } if (!('markerId' in event.detail) && 'markerId' in event) { -- GitLab