|
|
@@ -40,7 +40,10 @@ this.SingleFile = this.SingleFile || (() => {
|
|
|
} catch (error) {
|
|
|
return options && options.asDataURI ? "data:base64," : "";
|
|
|
}
|
|
|
- const contentType = resourceContent.headers.get("content-type");
|
|
|
+ let contentType = resourceContent.headers.get("content-type");
|
|
|
+ if (contentType) {
|
|
|
+ contentType = contentType.match(/^([^;]*)/)[0];
|
|
|
+ }
|
|
|
if (options && options.asDataURI) {
|
|
|
try {
|
|
|
const buffer = await resourceContent.arrayBuffer();
|