Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Apr 30, 2024
1 parent 368f090 commit a8be730
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ember_debug/libs/render-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ class InElementSupportProvider {
// nope
}

try {
requireModule(
'@glimmer/manager'
).CustomModifierManager.prototype.getDebugInstance = (args) =>
args.modifier || args.delegate;
} catch (e) {
// nope
}

this.DESTROY = emberSafeRequire('@glimmer/util')?.DESTROY;
this.registerDestructor =
emberSafeRequire('@glimmer/destroyable')?.registerDestructor ||
Expand Down Expand Up @@ -659,6 +668,7 @@ export default class RenderTree {
}

if (node.type === 'modifier') {
node.name = node.name?.replace(/[A-Z]/g, m => "-" + m.toLowerCase()).replace(/^-/, '').replace('-modifier', '');
node.instance =
node.instance || this._createSimpleInstance(node.name, node.args);
node.instance.toString = () => node.name;
Expand Down

0 comments on commit a8be730

Please sign in to comment.