Skip to content

Commit

Permalink
feat(xychart): print console.info only in dev mode (#1792)
Browse files Browse the repository at this point in the history
  • Loading branch information
sleonia authored Jan 23, 2024
1 parent eddcca4 commit 601e8b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/visx-xychart/src/components/XYChart.tsx
Original file line number Diff line number Diff line change
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 601e8b8

Please sign in to comment.