File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/@lwc/ssr-compiler/src/compile-template/transformers/component Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -281,8 +281,9 @@ export function getSlottedContent(
281281 const uniqueNodeId = `${ node . name } :${ node . location . start } :${ node . location . end } ` ;
282282
283283 if ( hasShadowSlottedContent && ! cxt . slots . shadow . isDuplicate ( uniqueNodeId ) ) {
284- // cxt.hoist.templateFn(slotAttributeValueAssignment, slotAttributeValueAssignment);
285- const kebabCmpName = kebabCaseToCamelCase ( node . name ) ;
284+ // Colon characters in <lwc:component> element name will result in an invalid
285+ // JavaScript identifier if not otherwise accounted for.
286+ const kebabCmpName = kebabCaseToCamelCase ( node . name ) . replace ( ':' , '_' ) ;
286287 const shadowSlotContentFnName = cxt . slots . shadow . register ( uniqueNodeId , kebabCmpName ) ;
287288 const shadowSlottedContentFn = bGenerateShadowSlottedContent (
288289 b . identifier ( shadowSlotContentFnName ) ,
You can’t perform that action at this time.
0 commit comments