Skip to content

Commit

Permalink
Fixing the TypeError: profilesInput when saving profile endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Dec 9, 2024
1 parent dc4829f commit 6e02af5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/components/Modal/Profile/useProfileModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const useProfileModal = (props: ProfileModalProps) => {
setProfilesInput(updatedProfiles);
setEditingIndex(null);
} else {
const isDuplicate = profilesInput.some(
const isDuplicate = Array.isArray(profilesInput) && profilesInput.some(
(item: Profile) =>
item?.name === profileName && item?.endpoint === profileEndpoint
);
Expand Down

0 comments on commit 6e02af5

Please sign in to comment.