File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ const availableItems = (
260
260
// Protocol selection form values for the subform
261
261
type ProtocolFormValues = {
262
262
protocolType : VpcFirewallRuleProtocol [ 'type' ] | ''
263
- icmpType ?: number | string // ComboboxField with allowArbitraryValues can return strings
263
+ icmpType ?: string // ComboboxField with allowArbitraryValues can return strings
264
264
icmpCode ?: string
265
265
}
266
266
@@ -356,11 +356,9 @@ const isDuplicateProtocol = (
356
356
357
357
type ParseResult < T > = { success : true ; data : T } | { success : false ; message : string }
358
358
359
- const parseIcmpType = (
360
- value : string | number | undefined
361
- ) : ParseResult < number | undefined > => {
359
+ const parseIcmpType = ( value : string | undefined ) : ParseResult < number | undefined > => {
362
360
if ( value === undefined || value === '' ) return { success : true , data : undefined }
363
- const parsed = typeof value === 'string' ? parseInt ( value , 10 ) : value
361
+ const parsed = parseInt ( value , 10 )
364
362
if ( isNaN ( parsed ) || parsed < 0 || parsed > 255 ) {
365
363
return { success : false , message : `ICMP type must be a number between 0 and 255` }
366
364
}
You can’t perform that action at this time.
0 commit comments