You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot read properties of undefined (reading 'touchId') - occurring from here when data is undefined.
Happy to raise a PR to protect against data being undefined however I'm unsure if that's just covering up another issue.
lete=event;if(e.originalEvent)e=e.originalEvent;lettargetTouch;constisTouchEvent=e.type==='touchend'||e.type==='touchcancel';if(!isTouchEvent){if(data.touchId!==null)return;// return from pointer if we use touch // ^^ error here when data is undefinedif(e.pointerId!==data.pointerId)return;targetTouch=e;}else{targetTouch=[...e.changedTouches].filter(t=>t.identifier===data.touchId)[0];if(!targetTouch||targetTouch.identifier!==data.touchId)return;
Expected Behavior
No error occurs when data is undefined
Actual Behavior
Cannot read properties of undefined (reading 'touchId')
Swiper version
11.1.3
Platform/Target and Browser Versions
We can see reports in Sentry for the following Chrome versions:
Hello @luke-rogers. Please provide a online reproduction by codesandbox or a minimal GitHub repository. You can fork one of our demos in codesandbox to get start. Issues labeled by missing demo will be closed if no activities in 3 days.
Check that this is really a bug
Reproduction link
Unsure on reproduction steps
Bug description
Cannot read properties of undefined (reading 'touchId') - occurring from here when data is undefined.
Happy to raise a PR to protect against
data
being undefined however I'm unsure if that's just covering up another issue.Expected Behavior
No error occurs when data is undefined
Actual Behavior
Cannot read properties of undefined (reading 'touchId')
Swiper version
11.1.3
Platform/Target and Browser Versions
We can see reports in Sentry for the following Chrome versions:
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: