Skip to content

Commit dbace1f

Browse files
committed
Fix VictoryBar regression related to FormidableLabs#2970
1 parent 27e2ce2 commit dbace1f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/victory-bar/src/helper-methods.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const getCalculatedValues = (props) => {
6464

6565
// when inside a zoom container, reset the _x and _y properties of each datum to the original
6666
// x and y property values so they will not be clipped. See https://github.com/FormidableLabs/victory/pull/2970
67-
if (props.groupComponent.type === VictoryClipContainer) {
67+
if (props.groupComponent?.type === VictoryClipContainer) {
6868
data = data.map((datum) => ({ ...datum, _x: datum.x, _y: datum.y }));
6969
}
7070

packages/victory-bar/src/victory-bar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class VictoryBarBase extends React.Component<VictoryBarProps> {
148148
// when inside a zoom container (the only place VictoryClipContainer is used), all data
149149
// should be renderable so bars won't dissappear before they've fully exited the container's bounds
150150
// see https://github.com/FormidableLabs/victory/pull/2970
151-
if (props.groupComponent.type === VictoryClipContainer) {
151+
if (props.groupComponent?.type === VictoryClipContainer) {
152152
children = this.renderData(props, VictoryBarBase.shouldRenderDatum);
153153
} else {
154154
children = this.renderData(props);

0 commit comments

Comments
 (0)