Răsfoiți Sursa

fixed regression when determining size of SVG images

Gildas 7 ani în urmă
părinte
comite
dc014ba428
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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);