From 0967c3fd902adedf0ef056c85912e5a933da44e6 Mon Sep 17 00:00:00 2001 From: Patrick Pircher Date: Fri, 26 Jul 2024 13:17:41 +0200 Subject: [PATCH] provide name for hbs template only components (#2581) --- ember_debug/libs/render-tree.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ember_debug/libs/render-tree.js b/ember_debug/libs/render-tree.js index 9cb6ce0ea7..03d027e642 100644 --- a/ember_debug/libs/render-tree.js +++ b/ember_debug/libs/render-tree.js @@ -661,6 +661,15 @@ export default class RenderTree { } if (node.type === 'component' && !node.instance) { + if ( + node.name === '(unknown template-only component)' && + node.template?.endsWith('.hbs') + ) { + node.name = node.template + .split(/\\|\//) + .slice(-1)[0] + .slice(0, -'.hbs'.length); + } node.instance = this._createSimpleInstance( 'TemplateOnlyComponent', node.args.named