@lwc/template-compiler 8.11.0 → 8.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -12205,9 +12205,12 @@ function parseScopedSlotFragment(ctx, parse5Elm, parse5ElmLocation, parent, pars
12205
12205
  if (ctx.findInCurrentElementScope(isElementDirective)) {
12206
12206
  ctx.throwAtLocation(ParserDiagnostics.SCOPED_SLOTDATA_CANNOT_BE_COMBINED_WITH_OTHER_DIRECTIVE, sourceLocation(parse5ElmLocation));
12207
12207
  }
12208
+ function isComponentOrLwcComponent(node) {
12209
+ return isComponent(node) || isLwcComponent(node);
12210
+ }
12208
12211
  // <template lwc:slot-data> element should always be the direct child of a custom element
12209
12212
  // The only exception is, a conditional block as parent
12210
- const parentCmp = ctx.findAncestor(isComponent, ({ current }) => current && isConditionalBlock(current));
12213
+ const parentCmp = ctx.findAncestor(isComponentOrLwcComponent, ({ current }) => current && isConditionalBlock(current));
12211
12214
  if (!parentCmp) {
12212
12215
  ctx.throwAtLocation(ParserDiagnostics.INVALID_PARENT_OF_LWC_SLOT_DATA, sourceLocation(parse5ElmLocation));
12213
12216
  }
@@ -14682,5 +14685,5 @@ function compile(source, filename, config) {
14682
14685
  }
14683
14686
 
14684
14687
  export { ElementDirectiveName, LWCDirectiveDomMode, LWCDirectiveRenderMode, LwcTagName, RootDirectiveName, TemplateDirectiveName, compile, compile as default, generateScopeTokens, kebabcaseToCamelcase, parse, toPropertyName };
14685
- /** version: 8.11.0 */
14688
+ /** version: 8.12.1 */
14686
14689
  //# sourceMappingURL=index.js.map