From 7b8526dfcf974756e27a9f3cef0c016c657ef6e8 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sun, 28 May 2023 12:24:28 +0200 Subject: [PATCH] Facet.idChainValues --- packages/core/src/runtime/actor.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/core/src/runtime/actor.ts b/packages/core/src/runtime/actor.ts index ec3bbc8..71f5b25 100644 --- a/packages/core/src/runtime/actor.ts +++ b/packages/core/src/runtime/actor.ts @@ -237,12 +237,18 @@ export class Facet { }); } - idChain(): string { - let facetIds = []; + idChainValues(): AnyValue[] { + let pieces = []; for (let f: Facet | null = this; f !== null; f = f.parent) { - facetIds.push(f.id); + pieces.push(f.id); } - return facetIds.reverse().join(':') + ':' + stringify(this.actor.name); + pieces.push(this.actor.name); + pieces.reverse(); + return pieces; + } + + idChain(): string { + return this.idChainValues().map(v => stringify(v)).join(':'); } toString(): string {