Skip to content

Fix bug where clicking "File > New" doesn't open a new sketch #2590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Prevent double alert.
  • Loading branch information
lindapaiste committed Nov 11, 2023
commit f9b12686297a8ea86a322a680b3c891d05bccaf1
2 changes: 1 addition & 1 deletion client/modules/IDE/actions/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export function resetProject() {
}

export function newProject() {
browserHistory.push('/');
browserHistory.push('/', { confirmed: true });
return resetProject();
}

Expand Down
3 changes: 2 additions & 1 deletion client/modules/IDE/pages/IDEView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ function WarnIfUnsavedChanges() {
isAuth(nextLocation.pathname) ||
isAuth(currentLocation.pathname) ||
isOverlay(nextLocation.pathname) ||
isOverlay(currentLocation.pathname)
isOverlay(currentLocation.pathname) ||
nextLocation.state?.confirmed
) {
return true; // allow navigation
}
Expand Down