mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -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') {
|
||||
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},
|
||||
|
|
Loading…
Reference in a new issue