Gildas 7 лет назад
Родитель
Сommit
9f78c09669
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      lib/single-file/single-file-browser.js

+ 1 - 1
lib/single-file/single-file-browser.js

@@ -48,7 +48,7 @@ this.SingleFile = (() => {
 					const bytes = new Uint8Array(buffer);
 					const bytes = new Uint8Array(buffer);
 					let base64Content = "";
 					let base64Content = "";
 					bytes.forEach(byte => base64Content += String.fromCharCode(byte));
 					bytes.forEach(byte => base64Content += String.fromCharCode(byte));
-					return "data:" + (contentType ? contentType + ";" : "") + "base64," + btoa(base64Content);
+					return "data:" + (contentType || "") + ";" + "base64," + btoa(base64Content);
 				} catch (e) {
 				} catch (e) {
 					return "data:base64,";
 					return "data:base64,";
 				}
 				}