From 218e786fcecde246993edccc27620c02466a7b0f Mon Sep 17 00:00:00 2001 From: daiwei Date: Thu, 26 Dec 2024 09:13:04 +0800 Subject: [PATCH] fix(runtime-vapor): properly normalize emits options if emits is an array --- packages/runtime-vapor/src/componentEmits.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-vapor/src/componentEmits.ts b/packages/runtime-vapor/src/componentEmits.ts index f26c6813505..60007037ef3 100644 --- a/packages/runtime-vapor/src/componentEmits.ts +++ b/packages/runtime-vapor/src/componentEmits.ts @@ -18,7 +18,7 @@ export function normalizeEmitsOptions( let normalized: ObjectEmitsOptions if (isArray(raw)) { normalized = {} - for (const key in raw) normalized[key] = null + for (const key of raw) normalized[key] = null } else { normalized = raw }