Skip to content

Commit e1bac77

Browse files
Deal with nonexistence of devicePixelRatio property in older browsers
1 parent d7172e1 commit e1bac77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ exports.create = function(element) {
294294

295295
var docHeight = doc.frame.bounds().h;
296296

297-
var dpr = Math.max(1, window.devicePixelRatio);
297+
var dpr = Math.max(1, window.devicePixelRatio || 1);
298298

299299
var logicalWidth = Math.max(doc.frame.actualWidth(), element.clientWidth),
300300
logicalHeight = element.clientHeight;

0 commit comments

Comments
 (0)