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

fixed regression when determining size of SVG images

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

+ 1 - 1
lib/single-file/util/doc-helper.js

@@ -306,7 +306,7 @@ this.docHelper = this.docHelper || (() => {
 	function getSize(win, imageElement) {
 		let pxWidth = imageElement.naturalWidth;
 		let pxHeight = imageElement.naturalHeight;
-		if (pxWidth >= 0 && pxHeight >= 0) {
+		if (pxWidth > 0 && pxHeight > 0) {
 			return { pxWidth, pxHeight };
 		} else {
 			const computedStyle = win.getComputedStyle(imageElement);