You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(nextjs): Make withSentryConfig return type match given config type (#3760)
When fixing https://github.com/getsentry/sentry-docs/issues/3723, the return type of `withSentryConfig` was changed from an object to a function which returns an object, since otherwise there's no way to get the `phase` and `defaultConfig` arguments needed when the user passes their existing nextjs config as a function.
If users follow our instructions in https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/, and export `withSentryConfig(...)` with no further modifications, this is an invisible change, since they're never dealing with its return value. But for any who do further process said value, it turns out to have been a potentially breaking change.
This reverts to the old behavior (of returning an object) in cases where the existing config is an object, and only returns a function when necessary, which is to say, when the existing config is itself a function.
Fixes#3722.
0 commit comments