diff --git a/src/plot.js b/src/plot.js index 39d3311785..040870f149 100644 --- a/src/plot.js +++ b/src/plot.js @@ -100,7 +100,7 @@ export function plot(options = {}) { for (const mark of marks) { if (mark.facet === "exclude") { const facetState = facetStateByMark.get(mark); - facetState.facetsIndex = facetExclude(facetState.facetsIndex); + if (facetState !== undefined) facetState.facetsIndex = facetExclude(facetState.facetsIndex); } } }