Skip to content

Commit

Permalink
rh empty string logic
Browse files Browse the repository at this point in the history
  • Loading branch information
brettedw committed Sep 25, 2024
1 parent c3c42fa commit 1a3b2f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/features/moreCast2/components/MoreCast2Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const windDirForecastField = new IndeterminateField(
)

export const rhForecastField = new IndeterminateField('rh', RH_HEADER, 'number', 0, true, (value: string) => {
return Number(value) < 1 || Number(value) > 100 ? 'RH must be between 1 and 100' : ''
return value !== '' && (Number(value) < 1 || Number(value) > 100) ? 'RH must be between 1 and 100' : ''
})
export const windSpeedForecastField = new IndeterminateField(
'windSpeed',
Expand Down

0 comments on commit 1a3b2f1

Please sign in to comment.