From cb2d8d0dd57c46d00e70e3f582611d02839fd2ce Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Tue, 17 Jan 2017 13:20:42 -0500 Subject: [PATCH] fix #269 --- client/components/Nav.jsx | 2 +- client/modules/IDE/actions/project.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 })