We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 134cd8b commit 1bb3970Copy full SHA for 1bb3970
src/app/story/register/_components/StoryImagePreview/StoryImagePreview.tsx
@@ -10,7 +10,7 @@ export const StoryImagePreview = () => {
10
const { watch, setValue } = useFormContext<StoryRegisterFormData>();
11
const imageFile = watch("image");
12
13
- const previewUrl = URL.createObjectURL(imageFile);
+ const previewUrl = imageFile && URL.createObjectURL(imageFile);
14
15
const validateImage = (file: File) => {
16
const result = imageFileSchema.safeParse(file);
0 commit comments