From f4cd745050c08f200b2c302fe4f0f9cf2a928c79 Mon Sep 17 00:00:00 2001 From: qiang Date: Fri, 24 Apr 2020 16:26:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=83=85=E5=86=B5=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=88=A4=E6=96=AD?= =?UTF-8?q?=20markerId=20=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 5a6fe3b57c..9decf38961 100644 --- a/src/core/runtime/wrapper/util.js +++ b/src/core/runtime/wrapper/util.js @@ -291,7 +291,7 @@ function wrapper (event) { event.detail = {} } - if (!('markerId' in event.detail) && 'markerId' in event) { + if (hasOwn(event, 'markerId') && !hasOwn(event.detail, 'markerId')) { event.detail.markerId = event.markerId } diff --git a/src/platforms/mp-alipay/runtime/wrapper/util.js b/src/platforms/mp-alipay/runtime/wrapper/util.js index a69b248663..ecf5b0f0db 100644 --- a/src/platforms/mp-alipay/runtime/wrapper/util.js +++ b/src/platforms/mp-alipay/runtime/wrapper/util.js @@ -62,7 +62,7 @@ export function initSpecialMethods (mpInstance) { if (!hasOwn(event, 'detail') || !event.detail) { event.detail = {} } - if (!('markerId' in event.detail) && 'markerId' in event) { + if (hasOwn(event, 'markerId') && !hasOwn(event.detail, 'markerId')) { event.detail.markerId = event.markerId } // TODO normalizeEvent -- GitLab