Fix pull request location resolver (#5898)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-06-21 23:17:23 +04:00 committed by GitHub
parent 631de6038e
commit 9df743b154
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1486,7 +1486,9 @@ export async function parseLinkId<T extends Doc> (
id: string, id: string,
_class: Ref<Class<T>> _class: Ref<Class<T>>
): Promise<Ref<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) { if (provider === undefined) {
return id as Ref<T> return id as Ref<T>