Skip to content

Commit 0967c3f

Browse files
authored
provide name for hbs template only components (#2581)
1 parent b09f0c2 commit 0967c3f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ember_debug/libs/render-tree.js

+9
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,15 @@ export default class RenderTree {
661661
}
662662

663663
if (node.type === 'component' && !node.instance) {
664+
if (
665+
node.name === '(unknown template-only component)' &&
666+
node.template?.endsWith('.hbs')
667+
) {
668+
node.name = node.template
669+
.split(/\\|\//)
670+
.slice(-1)[0]
671+
.slice(0, -'.hbs'.length);
672+
}
664673
node.instance = this._createSimpleInstance(
665674
'TemplateOnlyComponent',
666675
node.args.named

0 commit comments

Comments
 (0)