From 3a26df0eb22e0d0b06097dd2cabc8f8f9e4d9851 Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Fri, 17 Jan 2020 19:01:08 +0200 Subject: [PATCH] Destructure --- src/helpers/helpers.dom.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/helpers/helpers.dom.js b/src/helpers/helpers.dom.js index 4fda483e93e..4db17b6dc5b 100644 --- a/src/helpers/helpers.dom.js +++ b/src/helpers/helpers.dom.js @@ -153,9 +153,7 @@ export function getMaximumHeight(domNode) { export function retinaScale(chart, forceRatio) { const pixelRatio = chart.currentDevicePixelRatio = forceRatio || (typeof window !== 'undefined' && window.devicePixelRatio) || 1; - const canvas = chart.canvas; - const height = chart.height; - const width = chart.width; + const {canvas, width, height} = chart; canvas.height = height * pixelRatio; canvas.width = width * pixelRatio;