We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0b26db commit 7f4b1d9Copy full SHA for 7f4b1d9
src/core/core.helpers.js
@@ -502,7 +502,7 @@ module.exports = function(Chart) {
502
document.defaultView.getComputedStyle(el, null).getPropertyValue(property);
503
};
504
helpers.retinaScale = function(chart, forceRatio) {
505
- var pixelRatio = chart.currentDevicePixelRatio = forceRatio || window.devicePixelRatio || 1;
+ var pixelRatio = chart.currentDevicePixelRatio = forceRatio || (typeof window !== 'undefined' && window.devicePixelRatio) || 1;
506
if (pixelRatio === 1) {
507
return;
508
}
0 commit comments