diff --git a/src/widgets/action-editor/ui/ActionEditor.tsx b/src/widgets/action-editor/ui/ActionEditor.tsx index 5802aee..5674399 100644 --- a/src/widgets/action-editor/ui/ActionEditor.tsx +++ b/src/widgets/action-editor/ui/ActionEditor.tsx @@ -66,7 +66,9 @@ export default function ActionEditor({ : "empty"; const [imageUrl, setImageUrl] = useState( - attachmentType === "image" ? initialAction?.fileUrls[0]! : null, + initialAction && attachmentType === "image" + ? initialAction.fileUrls[0]! + : null, ); const [action, setAction] = useState(