From 087ed50db271d4e4e9d2891d2a9e333665872207 Mon Sep 17 00:00:00 2001 From: Patrick Pircher Date: Wed, 26 Jun 2024 17:10:46 +0200 Subject: [PATCH] delegate call to delegate --- packages/@glimmer/manager/lib/public/modifier.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/@glimmer/manager/lib/public/modifier.ts b/packages/@glimmer/manager/lib/public/modifier.ts index b0196ba3c4..4a5fae7f8d 100644 --- a/packages/@glimmer/manager/lib/public/modifier.ts +++ b/packages/@glimmer/manager/lib/public/modifier.ts @@ -117,7 +117,11 @@ export class CustomModifierManager return state; } - getDebugName(definition: object) { + getDebugName(owner: O, definition: object) { + let delegate = this.getDelegateFor(owner); + if (typeof delegate.getDebugName === 'function') { + return delegate.getDebugName(definition); + } if (typeof definition === 'function') { if (definition.toString !== Function.toString) { return definition.toString(); @@ -128,8 +132,12 @@ export class CustomModifierManager } } - getDebugInstance({ modifier }: CustomModifierState) { - return modifier; + getDebugInstance(owner: O, state: CustomModifierState) { + let delegate = this.getDelegateFor(owner); + if (typeof delegate.getDebugInstance === 'function') { + return delegate.getDebugInstance(state); + } + return state.modifier; } getTag({ tag }: CustomModifierState) {