diff --git a/plugins/view-resources/src/utils.ts b/plugins/view-resources/src/utils.ts index 92d03420ba..8af29d96d8 100644 --- a/plugins/view-resources/src/utils.ts +++ b/plugins/view-resources/src/utils.ts @@ -178,7 +178,9 @@ function getKeyLookup ( const lookupClass = (attribute.type as RefTo).to const index = key.indexOf('$lookup', lastIndex) if (index === -1) { - ;(lookup as any)[attrib] = lookupClass + if ((lookup as any)[attrib] === undefined) { + ;(lookup as any)[attrib] = lookupClass + } } else { let nested = Array.isArray((lookup as any)[attrib]) ? (lookup as any)[attrib][1] : {} nested = getKeyLookup(hierarchy, lookupClass, key.slice(index), nested)