Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit a08c357

Browse files
committed
Use parseFloat to detect pixel ratio styling.
1 parent 0f848c8 commit a08c357

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/load-image-scale.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
if (
237237
pixelRatio > 1 &&
238238
// Check if image has not yet device pixel ratio applied:
239-
parseInt(img.style.width, 10) !== width / pixelRatio
239+
parseFloat(img.style.width, 10) !== width / pixelRatio
240240
) {
241241
destWidth *= pixelRatio
242242
destHeight *= pixelRatio

0 commit comments

Comments
 (0)