Преглед на файлове

fixed canvas replacement issue

Gildas преди 7 години
родител
ревизия
af6e1e81f1
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      lib/single-file/single-file-core.js

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

@@ -931,10 +931,10 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 		static setBackgroundImage(element, url, style) {
 			element.style.setProperty("background-blend-mode", "normal", "important");
 			element.style.setProperty("background-clip", "content-box", "important");
-			element.style.setProperty("background-position", style["background-position"] ? style["background-position"] : "center", "important");
+			element.style.setProperty("background-position", style && style["background-position"] ? style["background-position"] : "center", "important");
 			element.style.setProperty("background-color", "transparent", "important");
 			element.style.setProperty("background-image", url, "important");
-			element.style.setProperty("background-size", style["background-size"] ? style["background-size"] : "100% 100%", "important");
+			element.style.setProperty("background-size", style && style["background-size"] ? style["background-size"] : "100% 100%", "important");
 			element.style.setProperty("background-origin", "content-box", "important");
 			element.style.setProperty("background-repeat", "no-repeat", "important");
 		}