From 2b5c819b096a840c0169812ed63c61b3d63f37b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Fri, 14 May 2021 22:05:59 +0200 Subject: [PATCH] fix #357; ignore null transform --- src/plot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plot.js b/src/plot.js index 8350bb4347..06bda82abf 100644 --- a/src/plot.js +++ b/src/plot.js @@ -35,7 +35,7 @@ export function plot(options = {}) { if (scale !== undefined) { const scaled = scaleChannels.get(scale); const {percent, transform = percent ? x => x * 100 : undefined} = options[scale] || {}; - if (transform !== undefined) channel.value = Array.from(channel.value, transform); + if (transform != null) channel.value = Array.from(channel.value, transform); if (scaled) scaled.push(channel); else scaleChannels.set(scale, [channel]); }