From 30ac91c4aefd0a644a7ccae19a32a9eb7499b38c Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 22 Mar 2020 20:05:27 +0100 Subject: [PATCH] Simpler feature check --- src/ol/has.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/has.js b/src/ol/has.js index 3fdebf833c..6452b79a58 100644 --- a/src/ol/has.js +++ b/src/ol/has.js @@ -37,7 +37,7 @@ export const MAC = ua.indexOf('macintosh') !== -1; * @type {number} * @api */ -export const DEVICE_PIXEL_RATIO = (typeof self !== 'undefined' ? self.devicePixelRatio : window.devicePixelRatio) || 1; +export const DEVICE_PIXEL_RATIO = typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1; /** * The execution context is a worker with OffscreenCanvas available.