Skip to content

Commit 71e22e1

Browse files
committed
ignore non-function transform
fixes #357
1 parent 1077eef commit 71e22e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function plot(options = {}) {
3535
if (scale !== undefined) {
3636
const scaled = scaleChannels.get(scale);
3737
const {percent, transform = percent ? x => x * 100 : undefined} = options[scale] || {};
38-
if (transform !== undefined) channel.value = Array.from(channel.value, transform);
38+
if (typeof transform === "function") channel.value = Array.from(channel.value, transform);
3939
if (scaled) scaled.push(channel);
4040
else scaleChannels.set(scale, [channel]);
4141
}

0 commit comments

Comments
 (0)