remove editor from url when not appropriate

This commit is contained in:
Ben Wheeler 2018-12-06 14:31:14 -05:00
parent 1adca1800a
commit 07568b0f65

View file

@ -470,7 +470,9 @@ class Preview extends React.Component {
if (projectId === '0') {
newUrl = `/${parts[0]}/editor`;
} else {
newUrl = `/${parts[0]}/${projectId}/editor`;
let modePath = '';
if (!this.props.playerMode) modePath = '/editor';
newUrl = `/${parts[0]}/${projectId}${modePath}`;
}
history.pushState(
{projectId: projectId},