Skip to content

Commit

Permalink
feat(xychart): print console.info only in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sleonia committed Jan 20, 2024
1 parent eddcca4 commit 0d2b44b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/visx-xychart/src/components/XYChart.tsx
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0d2b44b

Please sign in to comment.