From 3e0839621d059540c7569d699395ded76ee46b42 Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Mon, 9 Dec 2024 08:34:02 -0600 Subject: [PATCH] Fix regression in cursor rendering caused by #2999 Correct the rendering regression caused by the change in #2999 and captured by Chromatic in https://www.chromatic.com/test?appId=5b4acf7c54c0490024d5980b&id=675360427f60e8728902e703 --- .changeset/orange-rockets-rest.md | 5 +++++ .../src/victory-cursor-container.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/orange-rockets-rest.md diff --git a/.changeset/orange-rockets-rest.md b/.changeset/orange-rockets-rest.md new file mode 100644 index 000000000..888a59232 --- /dev/null +++ b/.changeset/orange-rockets-rest.md @@ -0,0 +1,5 @@ +--- +"victory-cursor-container": patch +--- + +Fix regression in cursor rendering caused by #2999 diff --git a/packages/victory-cursor-container/src/victory-cursor-container.tsx b/packages/victory-cursor-container/src/victory-cursor-container.tsx index 4f69ac75f..c897ca071 100644 --- a/packages/victory-cursor-container/src/victory-cursor-container.tsx +++ b/packages/victory-cursor-container/src/victory-cursor-container.tsx @@ -95,7 +95,7 @@ export const useVictoryCursorContainer = ( return isObject(c.props) && c.props.padding !== undefined; }) : props.children; - return Helpers.getPadding(child?.props); + return Helpers.getPadding(child?.props?.padding); } return Helpers.getPadding(props.padding); };