Skip to content
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

chore: Remove unnecessary console.error log from table.getColumn(id) implementation #5964

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mikekobit-stripe
Copy link

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 Remove error from row.getValue when column is not found or create new function #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.

…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.
@mikekobit-stripe mikekobit-stripe changed the title Remove unnecessary console.error log from table.getColumn(id) implementation chore: Remove unnecessary console.error log from table.getColumn(id) implementation Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant