diff --git a/packages/victory-core/src/victory-util/wrapper.js b/packages/victory-core/src/victory-util/wrapper.js index 135b373a6..fc84d695f 100644 --- a/packages/victory-core/src/victory-util/wrapper.js +++ b/packages/victory-core/src/victory-util/wrapper.js @@ -48,6 +48,9 @@ export default { } const firstChild = Array.isArray(children) && children[0]; + if (!firstChild) { + return undefined; + } let barWidth = firstChild.props.barWidth; let dataLength = (firstChild.props.data && firstChild.props.data.length) || 1;