From 601e8b8108c73464fb2b1df0376fedf6d7196e57 Mon Sep 17 00:00:00 2001 From: sleonia <46787637+sleonia@users.noreply.github.com> Date: Wed, 24 Jan 2024 00:23:46 +0300 Subject: [PATCH] feat(xychart): print console.info only in dev mode (#1792) --- packages/visx-xychart/src/components/XYChart.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/visx-xychart/src/components/XYChart.tsx b/packages/visx-xychart/src/components/XYChart.tsx index 4a474e6d0..f53a54052 100644 --- a/packages/visx-xychart/src/components/XYChart.tsx +++ b/packages/visx-xychart/src/components/XYChart.tsx @@ -192,7 +192,9 @@ export default function XYChart< } if (width <= 0 || height <= 0) { - console.info('XYChart has a zero width or height, bailing', { width, height }); + if (process.env.NODE_ENV === 'development') { + console.info('XYChart has a zero width or height, bailing', { width, height }); + } return null; }