fixed image type detection

canary
WolverinDEV 2019-05-25 21:25:15 +02:00
parent d6e9f5f649
commit 63a2b3a08a
1 changed files with 1 additions and 1 deletions

View File

@ -420,7 +420,7 @@ function image_type(base64: string | ArrayBuffer) {
return result;
};
const bin = typeof(base64) === "string" ? base64 : ab2str10();
const bin = typeof(base64) === "string" ? atob(base64) : ab2str10();
if(bin.length < 10) return ImageType.UNKNOWN;
if(bin[0] == String.fromCharCode(66) && bin[1] == String.fromCharCode(77)) {