Unverified Commit e9001e17 authored by Benjamin Wheeler's avatar Benjamin Wheeler Committed by GitHub

Merge pull request #2452 from benjiwheeler/parent-remix-null

if remix parent or original is unshared, don't crash project page
parents 88605f9c 634d6c93
......@@ -394,6 +394,10 @@ module.exports.getOriginalInfo = id => (dispatch => {
return;
}
dispatch(module.exports.setFetchStatus('original', module.exports.Status.FETCHED));
if (body && body.code === 'NotFound') {
dispatch(module.exports.setOriginalInfo({}));
return;
}
dispatch(module.exports.setOriginalInfo(body));
});
});
......@@ -414,6 +418,10 @@ module.exports.getParentInfo = id => (dispatch => {
return;
}
dispatch(module.exports.setFetchStatus('parent', module.exports.Status.FETCHED));
if (body && body.code === 'NotFound') {
dispatch(module.exports.setParentInfo({}));
return;
}
dispatch(module.exports.setParentInfo(body));
});
});
......
......@@ -8,6 +8,7 @@ const thumbnailUrl = require('../../lib/user-thumbnail');
const RemixCredit = props => {
const projectInfo = props.projectInfo;
if (Object.keys(projectInfo).length === 0) return null;
if (!projectInfo.author) return null;
return (
<FlexRow className="remix-credit">
<Avatar
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment