Skip to content

Conversation

serut
Copy link

@serut serut commented Apr 18, 2018

In my application, when I click the first time inside the scrollbar with a Chrome under mobile emulation, the event handleTouchEnd is called but no handleTouchStart.
This PR protects the handleTouchEnd event handler to throw that exception, since this.eventPreviousValues is undefined:

Uncaught TypeError: Cannot read property 'deltaX' of undefined
    at t.value (/bundle.js?5a5c0ac8dc6a61225da1:2:1002364)
    at Object.j (/bundle.js?5a5c0ac8dc6a61225da1:2:762488)
    at Object.invokeGuardedCallback (/bundle.js?5a5c0ac8dc6a61225da1:2:761767)
    at Object.invokeGuardedCallbackAndCatchFirstError (/bundle.js?5a5c0ac8dc6a61225da1:2:761882)
    at Z (/bundle.js?5a5c0ac8dc6a61225da1:2:763535)
    at ee (bundle.js?5a5c0ac8dc6a61225da1:2:763990)
    at ne (/bundle.js?5a5c0ac8dc6a61225da1:2:764175)
    at Array.forEach (native)
    at J (/bundle.js?5a5c0ac8dc6a61225da1:2:763804)
    at le (/bundle.js?5a5c0ac8dc6a61225da1:2:764909)

@serut
Copy link
Author

serut commented Apr 18, 2018

I thought at first one of my issue came from your lib, so I fix it. But in fact it was something else.

Anyway, you should merge it to prevent people using Chrome debugger to see that issue and loose some time on it as that event can be safely ignored.

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

Successfully merging this pull request may close these issues.

1 participant