Skip to content

Commit

Permalink
resolve bunny comment
Browse files Browse the repository at this point in the history
  • Loading branch information
reactoholic committed Jan 3, 2025
1 parent 63cba77 commit 9f7a004
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions src/core/ui/forms/MarkdownInput/FormikMarkdownField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,31 +150,24 @@ export const FormikMarkdownField = ({
for (const item of items) {
if (item.type.startsWith('image/')) {
const file = item.getAsFile();

if (file) {
for (const item of items) {
if (item.type.startsWith('image/')) {
const file = item.getAsFile();
if (file) {
const reader = new FileReader();
reader.onload = () => {
uploadFile({
variables: {
file,
uploadData: {
storageBucketId,
temporaryLocation: true,
},
},
});
};
reader.readAsDataURL(file);
}
event.preventDefault();
}
}
const reader = new FileReader();

reader.onload = () => {
uploadFile({
variables: {
file,
uploadData: {
storageBucketId,
temporaryLocation: true,
},
},
});
};

reader.readAsDataURL(file);
event.preventDefault();
}
event.preventDefault();
}
}
}
Expand Down

0 comments on commit 9f7a004

Please sign in to comment.