From 016e2656018bcbf805c1fb81de75d70a94b274ef Mon Sep 17 00:00:00 2001 From: Gareth Johnson Date: Wed, 27 Nov 2024 11:11:44 +0000 Subject: [PATCH] Switch to find --- src/core/HNamespace.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/HNamespace.ts b/src/core/HNamespace.ts index 8823b1a..284e40f 100644 --- a/src/core/HNamespace.ts +++ b/src/core/HNamespace.ts @@ -1667,10 +1667,10 @@ export class HNamespace { * @returns The containment ref def. */ public findContainmentRef(name: string | HSymbol): HDict | undefined { - return this.getContainmentRefs().filter( + return this.getContainmentRefs().find( (def) => !def.has('deprecated') && this.fits(name, def.get('containedBy') as HSymbol) - )[0] + ) } }