From a7d6f68feed71870505723175773b277aafa6e29 Mon Sep 17 00:00:00 2001 From: KazariEX <1364035137@qq.com> Date: Sat, 2 Nov 2024 18:01:19 +0800 Subject: [PATCH] fix(language-core): should exit incremental update when binding expression is empty --- packages/language-core/lib/plugins/vue-template-html.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/language-core/lib/plugins/vue-template-html.ts b/packages/language-core/lib/plugins/vue-template-html.ts index 75bbabe513..e06a3a605b 100644 --- a/packages/language-core/lib/plugins/vue-template-html.ts +++ b/packages/language-core/lib/plugins/vue-template-html.ts @@ -181,6 +181,10 @@ const plugin: VueLanguagePlugin = ({ modules }) => { if (node.isStatic) { return false; } + else if (!node.loc.source) { + // :class="..." -> :class="" + return false; + } else { node.content = node.loc.source; }