Skip to content

Commit 3c50686

Browse files
committed
fix: do not allow devicePixelRatio less than 0.1
1 parent ac826e8 commit 3c50686

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/minimap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ export default class Minimap {
864864
if (devicePixelRatio >= 0.5) {
865865
return Math.round(devicePixelRatio)
866866
} else {
867-
return Math.round(devicePixelRatio * 10) / 10
867+
return Math.max(Math.round(devicePixelRatio * 10) / 10, 0.1)
868868
}
869869
}
870870
return devicePixelRatio

0 commit comments

Comments
 (0)