Skip to content

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

Closed

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);
        }

Activity

  1. benvinegar commented on Aug 18, 2016

    @benvinegar
    Contributor

    This code should definitely guard against originalCallback not being defined. Feeling bad I didn't notice this during review.

    Thanks for reporting, we'll have a patch soon.

    cc @nevir

  2. added a commit that references this issue on Aug 18, 2016
    d356dfd
  3. nevir commented on Aug 18, 2016

    @nevir
    Contributor

    Doh! Sorry about that :(

  4. added a commit that references this issue on Jan 5, 2017
    b5a199a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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