diff --git a/util/Canvas.js b/util/Canvas.js index bce3b8bd..cdbd6165 100644 --- a/util/Canvas.js +++ b/util/Canvas.js @@ -78,8 +78,7 @@ class CanvasUtil { } static drawImageWithTint(ctx, image, color, x, y, width, height) { - const fillStyle = ctx.fillStyle; - const globalAlpha = ctx.globalAlpha; + const { fillStyle, globalAlpha } = ctx; ctx.fillStyle = color; ctx.drawImage(image, x, y, width, height); ctx.globalAlpha = 0.5;