Add props.onImageChange check in the slider change description handler
This commit is contained in:
parent
fedcfea23f
commit
46db039ced
|
@ -46,7 +46,9 @@ export const ImageSwiper = (props: Props) => {
|
|||
} = useSnackbar()
|
||||
|
||||
const handleSlideDescriptionChange = (index: number, field: string, value) => {
|
||||
props.onImageChange(index, { ...props.images[index], [field]: value })
|
||||
if (props.onImageChange) {
|
||||
props.onImageChange(index, { ...props.images[index], [field]: value })
|
||||
}
|
||||
}
|
||||
const swipeToUploaded = () => {
|
||||
setTimeout(() => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user