mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Add type annotation to fix TypeScript error in synonym validation
Co-authored-by: karilint <19990676+karilint@users.noreply.github.com>
This commit is contained in:
co-authored by
karilint
parent
2096ca29aa
commit
83f571688b
@@ -190,7 +190,7 @@ export const LocalityTab = () => {
|
||||
if (!trimmedValue) return 'Synonym is required'
|
||||
if (trimmedValue.length > 30) return 'Synonym must be 30 characters or fewer'
|
||||
|
||||
const duplicate = editData.now_syn_loc.some(existing => {
|
||||
const duplicate = editData.now_syn_loc.some((existing: Editable<LocalitySynonym>) => {
|
||||
if (existing.rowState === 'removed' || existing.rowState === 'cancelled') return false
|
||||
return (existing.synonym ?? '').trim().toLowerCase() === trimmedValue.toLowerCase()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user