Gildas 5 лет назад
Родитель
Сommit
97ccfed2a2
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      lib/single-file/single-file-core.js

+ 2 - 2
lib/single-file/single-file-core.js

@@ -1605,7 +1605,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 					resourceReferrer: options.resourceReferrer
 					resourceReferrer: options.resourceReferrer
 				});
 				});
 				if (!matchCharsetEquals(content.data, content.charset || options.charset)) {
 				if (!matchCharsetEquals(content.data, content.charset || options.charset)) {
-					options = Object.assign({}, options, { charset: getCharset(stylesheetContent) });
+					options = Object.assign({}, options, { charset: getCharset(content.data) });
 					return getStylesheetContent(resourceURL);
 					return getStylesheetContent(resourceURL);
 				} else {
 				} else {
 					return content;
 					return content;
@@ -1661,7 +1661,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 					validateTextContentType: true
 					validateTextContentType: true
 				});
 				});
 				if (!matchCharsetEquals(content.data, content.charset || options.charset)) {
 				if (!matchCharsetEquals(content.data, content.charset || options.charset)) {
-					options = Object.assign({}, options, { charset: getCharset(stylesheetContent) });
+					options = Object.assign({}, options, { charset: getCharset(content.data) });
 					return ProcessorHelper.resolveLinkStylesheetURLs(resourceURL, baseURI, options, workStylesheet);
 					return ProcessorHelper.resolveLinkStylesheetURLs(resourceURL, baseURI, options, workStylesheet);
 				}
 				}
 				resourceURL = content.resourceURL;
 				resourceURL = content.resourceURL;