mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
remove editor from url when not appropriate
This commit is contained in:
parent
1adca1800a
commit
07568b0f65
1 changed files with 3 additions and 1 deletions
|
@ -470,7 +470,9 @@ class Preview extends React.Component {
|
||||||
if (projectId === '0') {
|
if (projectId === '0') {
|
||||||
newUrl = `/${parts[0]}/editor`;
|
newUrl = `/${parts[0]}/editor`;
|
||||||
} else {
|
} else {
|
||||||
newUrl = `/${parts[0]}/${projectId}/editor`;
|
let modePath = '';
|
||||||
|
if (!this.props.playerMode) modePath = '/editor';
|
||||||
|
newUrl = `/${parts[0]}/${projectId}${modePath}`;
|
||||||
}
|
}
|
||||||
history.pushState(
|
history.pushState(
|
||||||
{projectId: projectId},
|
{projectId: projectId},
|
||||||
|
|
Loading…
Reference in a new issue