From e7d0bb1112e15d97cf72e126975e11444343561b Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Wed, 1 Feb 2017 22:02:32 -0500 Subject: [PATCH] revert project duplication to less broken state --- client/modules/IDE/actions/project.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/client/modules/IDE/actions/project.js b/client/modules/IDE/actions/project.js index fcb77f35..827f5af4 100644 --- a/client/modules/IDE/actions/project.js +++ b/client/modules/IDE/actions/project.js @@ -170,12 +170,13 @@ export function cloneProject() { return (dispatch, getState) => { dispatch(setUnsavedChanges(false)); const state = getState(); - const newFiles = state.files.map(file => { - const newFile = Object.assign({}, file); - newFile._id = objectID().toHexString(); - newFile.id = newFile._id; - return newFile; - }); + // const newFiles = state.files.map(file => { + // const newFile = Object.assign({}, file); + // newFile._id = objectID().toHexString(); + // newFile.id = newFile._id; + // return newFile; + // }); + const newFiles = state.files; const formParams = Object.assign({}, { name: `${state.project.name} copy` }, { files: newFiles }); axios.post(`${ROOT_URL}/projects`, formParams, { withCredentials: true }) .then(response => {