From ad85444b34e2af2b15c666d248001a8a754824c5 Mon Sep 17 00:00:00 2001 From: KazariEX <1364035137@qq.com> Date: Sat, 2 Nov 2024 21:19:29 +0800 Subject: [PATCH] fix(language-core): copy destructured props instead of referencing --- packages/language-core/lib/plugins/vue-tsx.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/language-core/lib/plugins/vue-tsx.ts b/packages/language-core/lib/plugins/vue-tsx.ts index a6d29e9682..c7e4db53e9 100644 --- a/packages/language-core/lib/plugins/vue-tsx.ts +++ b/packages/language-core/lib/plugins/vue-tsx.ts @@ -145,7 +145,7 @@ function createTsx( return newNames; }); const destructuredPropNames = computed>(oldNames => { - const newNames = scriptSetupRanges.get()?.props.destructured ?? new Set(); + const newNames = new Set(scriptSetupRanges.get()?.props.destructured); const rest = scriptSetupRanges.get()?.props.destructuredRest; if (rest) { newNames.add(rest);