Skip to content

Commit

Permalink
fix: show error on empty group name
Browse files Browse the repository at this point in the history
Signed-off-by: Hamza Mahjoubi <[email protected]>
  • Loading branch information
hamza221 committed Jan 31, 2025
1 parent b028792 commit 92aa49c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/AppNavigation/RootNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ export default {
createNewGroup(e) {
const input = e.target.querySelector('input[type=text]')
const groupName = input.value.trim()
if (groupName.length === 0) {
showError(t('contacts', 'Group name cannot be empty'))
return

Check warning on line 387 in src/components/AppNavigation/RootNavigation.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppNavigation/RootNavigation.vue#L386-L387

Added lines #L386 - L387 were not covered by tests
}
this.logger.debug('Creating new group', { groupName })

// Check if already exists
Expand Down

0 comments on commit 92aa49c

Please sign in to comment.