Cut staging from master #823

Merged
skhameneh merged 24 commits from master into staging 2018-12-14 23:53:07 +01:00
Showing only changes of commit bf2a52ba67 - Show all commits

View file

@ -57,15 +57,16 @@ module.exports = (req, res) => {
// Workaround, remove when a solution for async httpContext exists
const showState = store.getState().show;
const assetKeys = Object.keys(showState.assetList);
const channelKeys = Object.keys(showState.channelList);
if(assetKeys.length !== 0) {
res.claimId = showState.assetList[assetKeys[0]].claimId;
} else if (channelKeys.length !== 0) {
} else {
const channelKeys = Object.keys(showState.channelList);
if(channelKeys.length !== 0) {
res.claimId = showState.channelList[channelKeys[0]].longId;
res.isChannel = true;
} else {
res.status(404);
}
}
// render component to a string