use channelShortId in createCanonicalLink

This commit is contained in:
Travis Eden 2018-10-29 10:49:14 -04:00
parent 21467900f9
commit e706c1c661

View file

@ -11,12 +11,12 @@ const createBasicCanonicalLink = (page) => {
};
const createAssetCanonicalLink = (asset) => {
let channelName, certificateId, name, claimId;
let channelName, channelShortId, name, claimId;
if (asset.claimData) {
({ channelName, certificateId, name, claimId } = asset.claimData);
({ channelName, channelShortId, name, claimId } = asset.claimData);
}
if (channelName) {
return `${host}/${channelName}:${certificateId}/${name}`;
return `${host}/${channelName}:${channelShortId}/${name}`;
}
return `${host}/${claimId}/${name}`;
};