Skip to content

Commit

Permalink
Fix issue where quickly clicking "Create Project" button during proje…
Browse files Browse the repository at this point in the history
…ct creation could prevent new project from opening
  • Loading branch information
chrismaltby committed Oct 15, 2024
1 parent b578854 commit 256de1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Fix issue where errors in watched files could cause application to crash
- Fix issue where quickly clicking Create Project button during project creation could prevent new project from opening

## [4.1.3] - 2024-09-16

Expand Down
7 changes: 6 additions & 1 deletion src/components/app/Splash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ export const Splash = () => {

const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();

if (creating) {
return;
}

if (!name) {
setNameError(l10n("ERROR_PLEASE_ENTER_PROJECT_NAME"));
return;
Expand Down Expand Up @@ -329,7 +334,7 @@ export const Splash = () => {

{section === "new" && (
<SplashContent>
<SplashForm onSubmit={!creating ? onSubmit : undefined}>
<SplashForm onSubmit={onSubmit}>
<FormRow>
<TextField
name="name"
Expand Down

0 comments on commit 256de1f

Please sign in to comment.