From 9f9485832a60435df6d0327d7c777df8b472e7c0 Mon Sep 17 00:00:00 2001 From: Vivian Zhang Date: Wed, 22 May 2024 10:05:39 -0700 Subject: [PATCH] chore: add siteRelativeEntityType to content affects: @esri/hub-common --- packages/common/src/content/_internal/computeProps.ts | 1 + packages/common/src/content/get-family.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/common/src/content/_internal/computeProps.ts b/packages/common/src/content/_internal/computeProps.ts index b777c573299..7d373971680 100644 --- a/packages/common/src/content/_internal/computeProps.ts +++ b/packages/common/src/content/_internal/computeProps.ts @@ -45,6 +45,7 @@ export function computeProps( content.slug || content.id, content.typeKeywords ), + siteRelativeEntityType: getHubRelativeUrl(content.type), workspaceRelative: getRelativeWorkspaceUrl("content", content.id), thumbnail: thumbnailUrl, contentEditUrl: getContentEditUrl(model.item, requestOptions), diff --git a/packages/common/src/content/get-family.ts b/packages/common/src/content/get-family.ts index 1b9f6e63c6e..8bcdb415cad 100644 --- a/packages/common/src/content/get-family.ts +++ b/packages/common/src/content/get-family.ts @@ -19,7 +19,7 @@ export function getFamily(type: string) { let family; // override default behavior for the rows that are highlighted in yellow here: // https://esriis.sharepoint.com/:x:/r/sites/ArcGISHub/_layouts/15/Doc.aspx?sourcedoc=%7BADA1C9DC-4F6C-4DE4-92C6-693EF9571CFA%7D&file=Hub%20Routes.xlsx&nav=MTBfe0VENEREQzI4LUZFMDctNEI0Ri04NjcyLThCQUE2MTA0MEZGRn1fezIwMTIwMEJFLTA4MEQtNEExRC05QzA4LTE5MTAzOUQwMEE1RH0&action=default&mobileredirect=true&cid=df1c874b-c367-4cea-bc13-7bebfad3f2ac - switch (type.toLowerCase()) { + switch (type?.toLowerCase()) { // NOTE: we really want to put tiled image services in the maps family // but we would need the typekeywords to differentiate them // for now send them to the maps route here: