Skip to content

Commit 065b22e

Browse files
committed
Update vendored load-image dev dependency.
1 parent d71a491 commit 065b22e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/vendor/load-image-scale.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,12 @@
235235
pixelRatio = options.pixelRatio
236236
if (
237237
pixelRatio > 1 &&
238-
// Check if image has not yet device pixel ratio applied:
239-
parseFloat(img.style.width, 10) !== width / pixelRatio
238+
// Check if the image has not yet had the device pixel ratio applied:
239+
!(
240+
img.style.width &&
241+
Math.floor(parseFloat(img.style.width, 10)) ===
242+
Math.floor(width / pixelRatio)
243+
)
240244
) {
241245
destWidth *= pixelRatio
242246
destHeight *= pixelRatio

0 commit comments

Comments
 (0)