Skip to content
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

Error when pop the page with a PullToRefresh #7

Open
Liuthx opened this issue Dec 30, 2016 · 4 comments
Open

Error when pop the page with a PullToRefresh #7

Liuthx opened this issue Dec 30, 2016 · 4 comments

Comments

@Liuthx
Copy link

Liuthx commented Dec 30, 2016

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);
    }
  }
@evetstech
Copy link
Owner

Sorry about the late reply, can you post a little more code of what you're doing when you're popping? I can't reproduce the error.

@Liuthx
Copy link
Author

Liuthx commented Feb 4, 2017

I only pop the navigator stack:
onPress={()=>{this.props.navigator.pop()}}

Here is a demo. https://github.com/Liuthx/ptr_bug_test

@leonardollobato
Copy link

any resolution for this issue?

@tikkichan4
Copy link

Same problem...Any workaround for this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants