diff --git a/src/core/runtime/wrapper/util.js b/src/core/runtime/wrapper/util.js index f7a086ca61b12d4afc3fce32fdbb171086ac3702..83a63a2915a695f48e162a334ea417c674f8d463 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 69d91c489d45a3e81a827883d696bddbf2f83e4f..a69b2486636e7dd0ce5cbae47661fb8d6b668e21 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) {