-
Notifications
You must be signed in to change notification settings - Fork 272
feat: logger supports console.table, with console.log fallback #738
feat: logger supports console.table, with console.log fallback #738
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/superset/superset-ui/1z9dghh9q |
Not quite sure how to unit test this, since it depends on the browser. |
Codecov Report
@@ Coverage Diff @@
## master #738 +/- ##
==========================================
+ Coverage 24.35% 24.43% +0.07%
==========================================
Files 340 340
Lines 7637 7645 +8
Branches 929 935 +6
==========================================
+ Hits 1860 1868 +8
Misses 5704 5704
Partials 73 73
Continue to review full report at Codecov.
|
Here's how I tested it:
If you have time, might as well do the fallbacks for all other console methods: const console = window.console || {};
const log = console.log || () => {};
const logger = {
log,
warn: console.warn || log,
debug: console.debug || log,
...
} |
💔 Breaking Changes
🏆 Enhancements
Supports console.table safely :)
📜 Documentation
🐛 Bug Fix
🏠 Internal