From 8fa525acaad4a5e8c4706447199b2550013878cf Mon Sep 17 00:00:00 2001 From: lareinayanyu Date: Tue, 14 Jan 2025 18:36:46 +0800 Subject: [PATCH] fix: error --- packages/webpack-plugin/lib/template-compiler/compiler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/webpack-plugin/lib/template-compiler/compiler.js b/packages/webpack-plugin/lib/template-compiler/compiler.js index 9b1ff24b9..b3e1bba93 100644 --- a/packages/webpack-plugin/lib/template-compiler/compiler.js +++ b/packages/webpack-plugin/lib/template-compiler/compiler.js @@ -1324,7 +1324,7 @@ function processEvent (el, options) { const extraStr = runtimeCompile && prefix === 'catch' ? `, "__mpx_${prefix}"` : '' const parsedFunc = parseFuncStr(value, extraStr) if (parsedFunc) { - const isCapture = modifiers.indexOf('capture') > -1 + const isCapture = prefix.indexOf('capture') > -1 if (!eventConfigMap[type]) { eventConfigMap[type] = { configs: [], @@ -1376,7 +1376,7 @@ function processEvent (el, options) { for (const type in eventConfigMap) { let needBubblingBind = false let needCaptureBind = false - const { configs, captureConfigs, proxy } = eventConfigMap[type] + const { configs = [], captureConfigs = [], proxy } = eventConfigMap[type] delete eventConfigMap[type] if (proxy) { needBubblingBind = true