BoxFactura / pulltorefresh.js

A quick and powerful plugin for your pull-to-refresh needs in your webapp.
http://bxf.mx/pulltorefresh.js/
MIT License
3.97k stars 278 forks source link

Cannot read property 'classList' of null within onReset() #87

Closed johnysusanto closed 4 years ago

johnysusanto commented 4 years ago

Bug report

Current behavior: We're getting errors Cannot read property 'classList' of null via our Sentry and it traces down to /node_modules/pulltorefreshjs/dist/index.umd.js in onReset at line 72:24

Expected behavior: Should check if element exist before proceeding with the function's process

Screen Shot 2020-02-18 at 2 57 39 pm

JSFiddle URL for demo with bug:

Browsers affected:

pateketrueke commented 4 years ago

Got it, which version you're using?

faelsoto commented 4 years ago

@johnysusanto all fields are required, especially the JSFiddle URL so we can debug it. Feel free to open another issue and be sure to complete every piece of data required.

johnysusanto commented 4 years ago

Got it, which version you're using?

It's the latest one. 0.1.20

@johnysusanto all fields are required, especially the JSFiddle URL so we can debug it. Feel free to open another issue and be sure to complete every piece of data required.

It happens randomly so it's quite hard for us to replicate this. But looking at the Sentry log, I think the fix location should be quite obvious

Thank you

pateketrueke commented 4 years ago

Yeah, may be there is a race condition in your code but according our tests those are covered. If something happens at implementation level is hard to actually understand without enough context.

Having a minimal reproducible example that demonstrate the issue is the right way to begin.