Skip to content

Commit

Permalink
Switch to find
Browse files Browse the repository at this point in the history
  • Loading branch information
garethj2 committed Nov 27, 2024
1 parent 1029a81 commit 016e265
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/HNamespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
)
}
}

0 comments on commit 016e265

Please sign in to comment.