diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index 63bab433..563a8832 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -40,7 +40,7 @@ function Nav(props) { } })()} {(() => { // eslint-disable-line - if (props.project.id) { + if (props.project.id && props.user.authenticated) { return (
  • diff --git a/client/modules/IDE/actions/project.js b/client/modules/IDE/actions/project.js index d5d0b179..020cc921 100644 --- a/client/modules/IDE/actions/project.js +++ b/client/modules/IDE/actions/project.js @@ -151,6 +151,7 @@ export function newProject() { export function cloneProject() { return (dispatch, getState) => { + dispatch(setUnsavedChanges(false)); const state = getState(); const formParams = Object.assign({}, { name: `${state.project.name} copy` }, { files: state.files }); axios.post(`${ROOT_URL}/projects`, formParams, { withCredentials: true })