Skip to content

Commit cb0a557

Browse files
author
Vikas Agarwal
committed
Github issue#1104, "Create a new project" action should consider the product from the URL
— Reverted the changes made for #1114 because is creating more issues than solving a rare problem. We need to fix it again using some other approach. With this change, it is now saving the incomplete project only when the project is dirty.
1 parent 2194af0 commit cb0a557

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/projects/create/containers/CreateContainer.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ class CreateConainer extends React.Component {
108108

109109
// stores the incomplete project in local storage
110110
onLeave(e) {// eslint-disable-line no-unused-vars
111-
const { wizardStep } = this.state
112-
if (wizardStep === ProjectWizard.Steps.WZ_STEP_FILL_PROJ_DETAILS) {// Project Details step
113-
console.log('saving incomplete project')
111+
const { wizardStep, isProjectDirty } = this.state
112+
if (wizardStep === ProjectWizard.Steps.WZ_STEP_FILL_PROJ_DETAILS && isProjectDirty) {// Project Details step
113+
console.log('saving incomplete project', this.state.updatedProject)
114114
window.localStorage.setItem(LS_INCOMPLETE_PROJECT, JSON.stringify(this.state.updatedProject))
115115
}
116116
// commenting alerts for the page unload and route change hooks as discussed

0 commit comments

Comments
 (0)