Skip to content

Error when pop the page with a PullToRefresh #7

@Liuthx

Description

@Liuthx

react-native: 0.39.2
When I pop the page with a PullToRefresh, It shows the error: 'Cannot read property 'removeListener' of undefined', like this:

image

code in TimedAnination.js, line 96:

  componentWillUnmount() {
    if(this.triggerBindID) {
      this.state.scrollY.removeListener(this.triggerBindID);
    }
  }

should I modify the code link this, and what should I do next?:

  componentWillUnmount() {
    if(this.triggerBindID) {
      this.state.scrollY && this.state.scrollY.removeListener(this.triggerBindID);
    }
  }

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