-
Notifications
You must be signed in to change notification settings - Fork 12
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
Cannot read properties of undefined (reading 'context') #102
Comments
Running into the same issue, here's my usage:
|
I have a similar issue. `
} |
I came across this same issue as well, using: I think the Rollbar library should be able to set a default payload if none is provided in the initial config. Workaround: Setup the Provider to have a default value in the config for import { Provider } from '@rollbar/react';
// ...
<Provider
config={{
enabled: true,
payload: {},
}}
> as long as the payload object is defined initially, then setting a context later will not throw an error. |
I'm trying to use
RollbarContext
and it's giving me an error on itscomponentDidMount
function as it's trying to accessrollbar.options.payload.context
(see here). Looking at therollbar.options
object, there's nopayload
.This is how I'm using the
<RollbarContext>
:I'm using the following versions of the libraries:
[email protected]
@rollbar/[email protected]
The text was updated successfully, but these errors were encountered: