Skip to content

React Native: TypeError: undefined is not an object (evaluating 'originalCallback.call') #692

@marcello3d

Description

@marcello3d

Getting an exception here: https://github.com/getsentry/raven-js/blob/master/plugins/react-native.js#L89

TypeError: undefined is not an object (evaluating 'originalCallback.call')

Adding a guard seems to resolve the problem, though I don't understand the source enough to know if that's the right solution:

    Raven.setShouldSendCallback(function(data, originalCallback) {
        if (originalCallback && !(FATAL_ERROR_KEY in data)) {
            return originalCallback.call(this, data);
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions