Skip to content

Commit

Permalink
fix(language-core): prevent type error when use defineSlots and non-t…
Browse files Browse the repository at this point in the history
…emplate (#4809)

* fix(language-core): prevent type error when use defineSlots and no template

* fix: typo
  • Loading branch information
zhiyuanzmj authored Sep 4, 2024
1 parent 410f929 commit b43708e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/language-core/lib/codegen/script/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ function* generateTemplateBody(
yield `// no template${newLine}`;
if (!options.scriptSetupRanges?.slots.define) {
yield `const __VLS_slots = {}${endOfLine}`;
yield `const $refs = {}${endOfLine}`;
yield `const __VLS_inheritedAttrs = {}${endOfLine}`;
}
yield `const $refs = {}${endOfLine}`;
yield `const __VLS_inheritedAttrs = {}${endOfLine}`;
}

yield `return {${newLine}`;
Expand Down

0 comments on commit b43708e

Please sign in to comment.