Skip to content

Commit b43708e

Browse files
authored
fix(language-core): prevent type error when use defineSlots and non-template (#4809)
* fix(language-core): prevent type error when use defineSlots and no template * fix: typo
1 parent 410f929 commit b43708e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/language-core/lib/codegen/script/template.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ function* generateTemplateBody(
175175
yield `// no template${newLine}`;
176176
if (!options.scriptSetupRanges?.slots.define) {
177177
yield `const __VLS_slots = {}${endOfLine}`;
178-
yield `const $refs = {}${endOfLine}`;
179-
yield `const __VLS_inheritedAttrs = {}${endOfLine}`;
180178
}
179+
yield `const $refs = {}${endOfLine}`;
180+
yield `const __VLS_inheritedAttrs = {}${endOfLine}`;
181181
}
182182

183183
yield `return {${newLine}`;

0 commit comments

Comments
 (0)