Skip to content

Commit

Permalink
two profiles can't have the same name
Browse files Browse the repository at this point in the history
  • Loading branch information
Kensaa committed Jan 13, 2024
1 parent 2c378a3 commit 080c101
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion launcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "A Minecraft launcher with auto-update feature to facilitate playing modded minecraft",
"author": "Kensa",
"private": true,
"version": "3.1.0",
"version": "3.1.1",
"license": "MIT",
"main": "dist-electron/electron.js",
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion launcher/src/pages/ProfileManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ function ProfileEdit({ profile, hide }: ProfileEditProps) {
<Button
type='submit'
variant='success'
disabled={name === '' || version === ''}
disabled={
name === '' ||
version === '' ||
(!profile && localProfiles.some(p => p.name === name))
}
>
Save
</Button>
Expand Down

0 comments on commit 080c101

Please sign in to comment.