Skip to content

Commit

Permalink
fix: pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlaPaiva committed Feb 3, 2024
1 parent e08b626 commit a30f681
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,15 @@ const UploadStep = memo(function UploadStepComponent(

const onSelectedFormatChange = useCallback(
(value: (string | number)[]) => {
setFormat(value[1] as string)
props.updateSelectedExtension(value[1] as string)
const result = value[1] as string

if (!result) {
console.warn('Could not read selected format.')
return
}

setFormat(result)
props.updateSelectedExtension(result)
},
[props],
)
Expand Down
3 changes: 2 additions & 1 deletion src/model/format.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** Defines a format */
/** Category of a Format */
type FormatCategory = 'Image' | 'Audio' | 'Video' | 'File'

/** Defines a format */
export type Format = {
/** Name o the format */
name: string
Expand Down

0 comments on commit a30f681

Please sign in to comment.