From a479a5740b1d5d0c827a2960132b1694368378e7 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 15 Jun 2022 16:15:57 +0100 Subject: [PATCH] declare from/to with let, as they can be changed --- packages/tone/pianoroll.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tone/pianoroll.mjs b/packages/tone/pianoroll.mjs index b77c5dec..4035b14e 100644 --- a/packages/tone/pianoroll.mjs +++ b/packages/tone/pianoroll.mjs @@ -29,8 +29,8 @@ Pattern.prototype.pianoroll = function ({ const ctx = getDrawContext(); const w = ctx.canvas.width; const h = ctx.canvas.height; - const from = -cycles * playhead; - const to = cycles * (1 - playhead); + let from = -cycles * playhead; + let to = cycles * (1 - playhead); if (timeframeProp) { console.warn('timeframe is deprecated! use from/to instead');