diff --git a/src/channel.js b/src/channel.js index d2a63219ad..2614fab9b6 100644 --- a/src/channel.js +++ b/src/channel.js @@ -76,7 +76,7 @@ export function channelDomain(channels, facetChannels, data, options) { function sortInitializer(name, optional, compare = ascendingDefined) { return (data, facets, {[name]: V}) => { if (!V) { - if (optional) return {}; // do nothing if given channel does not exist + if (optional) return {facets}; // do nothing if given channel does not exist throw new Error(`missing channel: ${name}`); } V = V.value; diff --git a/test/output/hexbinText.svg b/test/output/hexbinText.svg index eee645ce84..b251c8c6f7 100644 --- a/test/output/hexbinText.svg +++ b/test/output/hexbinText.svg @@ -86,64 +86,58 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + 7447546101148212213115315122311311111115712313414662111 @@ -152,75 +146,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5141131318111414541111112111225522111138131466654241110113111211 - - - - - - + + + + + + + + 11211111 diff --git a/test/output/penguinDodgeHexbin.svg b/test/output/penguinDodgeHexbin.svg index 863a0fb098..2a4b7b57fd 100644 --- a/test/output/penguinDodgeHexbin.svg +++ b/test/output/penguinDodgeHexbin.svg @@ -360,8 +360,6 @@ - - @@ -437,6 +435,8 @@ + + @@ -503,8 +503,6 @@ - - @@ -635,6 +633,8 @@ + +