-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chore: Remove unnecessary console.error log from table.getColumn(id) implementation
#5964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: Remove unnecessary console.error log from table.getColumn(id) implementation
#5964
Conversation
…lementation The `getColumn` method is already typed to return `Column<TData, unknown> | undefined`, indicating to callers that the result might be undefined. The current `console.error` logging when a column is not found: 1. Adds noise in development environments 2. Can mask actual issues 3. Forces users to implement workarounds (as discussed in TanStack#5505) This change removes the error logging while maintaining the expected return type, allowing consumers to handle undefined columns as already expected by the API.
console.error log from table.getColumn(id) implementationconsole.error log from table.getColumn(id) implementation
|
Is anybody available to review this? |
deepan-ashby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just ran into this myself, this seems like a reasonable fix
|
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The
getColumnmethod is already typed to returnColumn<TData, unknown> | undefined, indicating to callers that the result might be undefined. The currentconsole.errorlogging when a column is not found:This change removes the error logging while maintaining the expected return type, allowing consumers to handle undefined columns as already expected by the API.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.