Bläddra i källkod

fix data URI formatting

Gildas 7 år sedan
förälder
incheckning
9f78c09669
1 ändrade filer med 1 tillägg och 1 borttagningar
  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);
 					let base64Content = "";
 					bytes.forEach(byte => base64Content += String.fromCharCode(byte));
-					return "data:" + (contentType ? contentType + ";" : "") + "base64," + btoa(base64Content);
+					return "data:" + (contentType || "") + ";" + "base64," + btoa(base64Content);
 				} catch (e) {
 					return "data:base64,";
 				}