diff --git a/src/components/colorscale/calc.js b/src/components/colorscale/calc.js index e887b6820cd..9b3b9de15e3 100644 --- a/src/components/colorscale/calc.js +++ b/src/components/colorscale/calc.js @@ -48,6 +48,8 @@ module.exports = function calc(gd, trace, opts) { } if(containerStr) { + if(inputContainer[containerStr] === undefined) return; + container = Lib.nestedProperty(container, containerStr).get(); inputContainer = Lib.nestedProperty(inputContainer, containerStr).get(); fullInputContainer = Lib.nestedProperty(fullInputContainer, containerStr).get() || {};