The Provider validates the Rollbar instance, when one is in the props, by testing instanceof the default Rollbar import. This fails when the instance was constructed from another import or require. The specific issue report involves using the noconflict bundle.
This PR looks for an initialized options object instead. This will successfully catch common errors like passing the constructor function or failing to initialize before passing the instance.
Type of change
[x] Bug fix (non-breaking change that fixes an issue)
Description of the change
The Provider validates the Rollbar instance, when one is in the props, by testing
instanceof
the defaultRollbar
import. This fails when the instance was constructed from another import or require. The specific issue report involves using the noconflict bundle.This PR looks for an initialized options object instead. This will successfully catch common errors like passing the constructor function or failing to initialize before passing the instance.
Type of change
Related issues
Fixes https://github.com/rollbar/rollbar-react/issues/24
Development
Code review