From 59a367cc9e980d14f05f69b83076356a894f4396 Mon Sep 17 00:00:00 2001 From: _Kerman Date: Tue, 13 Aug 2024 17:02:18 +0800 Subject: [PATCH] fix --- .../language-core/lib/codegen/template/elementDirectives.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/language-core/lib/codegen/template/elementDirectives.ts b/packages/language-core/lib/codegen/template/elementDirectives.ts index bf5c2aff22..2540c5fb2b 100644 --- a/packages/language-core/lib/codegen/template/elementDirectives.ts +++ b/packages/language-core/lib/codegen/template/elementDirectives.ts @@ -69,7 +69,7 @@ export function* generateElementDirectives( prop.exp.loc.end.offset, ctx.codeFeatures.verification, '["value"', - [' '.repeat(prop.exp.content.length - 1) + ']', 'template', prop.exp.loc.start.offset, ctx.codeFeatures.verification] satisfies Code, + prop.exp.content.length ? [' '.repeat(prop.exp.content.length - 1) + ']', 'template', prop.exp.loc.start.offset, ctx.codeFeatures.verification] satisfies Code : ']', ': ', ), ...wrapWith(