A little bit of cleanup
This commit is contained in:
parent
02bd4c6fd8
commit
6761e39d70
2 changed files with 2 additions and 5 deletions
|
@ -65,11 +65,11 @@ exports.check = (cmd) => {
|
|||
|
||||
exports.getType = async (image) => {
|
||||
if (!image.startsWith("http")) {
|
||||
imageType = await fileType.fromFile(image)
|
||||
const imageType = await fileType.fromFile(image);
|
||||
if (imageType && formats.includes(imageType.mime)) {
|
||||
return imageType.mime;
|
||||
}
|
||||
return undefined
|
||||
return undefined;
|
||||
}
|
||||
let type;
|
||||
const controller = new AbortController();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue