فهرست منبع

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);