[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix pull request location resolver (hcengineering#5898)
Browse files Browse the repository at this point in the history
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
  • Loading branch information
kristina-fefelova committed Jun 21, 2024
1 parent 631de60 commit 9df743b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/view-resources/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,9 @@ export async function parseLinkId<T extends Doc> (
id: string,
_class: Ref<Class<T>>
): Promise<Ref<T>> {
const provider = providers.find(({ _id }) => _id === _class)
const hierarchy = getClient().getHierarchy()
const provider =
providers.find(({ _id }) => id === _class) ?? providers.find(({ _id }) => hierarchy.isDerived(_class, _id))

if (provider === undefined) {
return id as Ref<T>
Expand Down

0 comments on commit 9df743b

Please sign in to comment.