diff --git a/src/core/core.helpers.js b/src/core/core.helpers.js index 347fd958e83..d49451d1846 100644 --- a/src/core/core.helpers.js +++ b/src/core/core.helpers.js @@ -502,7 +502,7 @@ module.exports = function(Chart) { document.defaultView.getComputedStyle(el, null).getPropertyValue(property); }; helpers.retinaScale = function(chart, forceRatio) { - var pixelRatio = chart.currentDevicePixelRatio = forceRatio || window.devicePixelRatio || 1; + var pixelRatio = chart.currentDevicePixelRatio = forceRatio || (typeof window !== 'undefined' && window.devicePixelRatio) || 1; if (pixelRatio === 1) { return; }