forked from PluralFlux/PluralFlux
removed unnecessary try/catch from utils
This commit is contained in:
@@ -28,15 +28,10 @@ u.checkImageFormatValidity = async function (imageUrl) {
|
|||||||
throw new Error(`${enums.err.PROPIC_CANNOT_LOAD}: ${e.message}`);
|
throw new Error(`${enums.err.PROPIC_CANNOT_LOAD}: ${e.message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
blobFile = await response.blob();
|
||||||
blobFile = await response.blob();
|
if (blobFile.size > 10000000 || !acceptableImages.includes(blobFile.type)) throw new Error(enums.err.PROPIC_FAILS_REQUIREMENTS);
|
||||||
if (blobFile.size > 10000000 || !acceptableImages.includes(blobFile.type)) throw new Error(enums.err.PROPIC_FAILS_REQUIREMENTS);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
catch(error) {
|
|
||||||
throw new Error(error.message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const utils = u;
|
export const utils = u;
|
||||||
|
|||||||
Reference in New Issue
Block a user