Skip to content

Commit

Permalink
Removed Prefix from Displayed UUID Value on Assets (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheintzman authored May 8, 2024
1 parent 423a378 commit f7c918a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/metadata-html-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ export async function fetchMetadataAndCreateHTML(metadataViewConfig, assetData,
if (assetData === undefined || assetJSON === undefined) {
assetJSON = await getAssetMetadata(getAssetIdFromURL());
}
// Remove "urn:aaid:aem:" prefix from displayed 'assetId' value
if (assetJSON.assetId) {
// A deep copy of the assetJSON object is created to avoid modifying the original object
assetJSON = JSON.parse(JSON.stringify(assetJSON));
assetJSON.assetId = assetJSON.assetId.replace('urn:aaid:aem:', '');
}

const metadataContainer = document.createElement('div');
metadataContainer.classList.add('metadata-container');
Expand Down

0 comments on commit f7c918a

Please sign in to comment.