get rid of example.png image name check

This commit is contained in:
shatfield4 2024-09-19 12:16:48 -07:00
parent a19cd53c8a
commit af843a24c6

View File

@ -9,9 +9,7 @@ export function useImagePaste(onImagePaste) {
e.preventDefault();
const blob = items[i].getAsFile();
const fileName =
blob.name !== "image.png"
? blob.name
: `pasted-image.${blob.type.split("/")[1]}`;
blob.name || `pasted-image.${blob.type.split("/")[1]}`;
const file = new File([blob], fileName, { type: blob.type });
onImagePaste(file);
break;