diff --git a/src/core/events/onTouchStart.js b/src/core/events/onTouchStart.js index bcd5a474c..aa8b69d74 100644 --- a/src/core/events/onTouchStart.js +++ b/src/core/events/onTouchStart.js @@ -46,13 +46,9 @@ export default function onTouchStart(event) { // change target el for shadow root component const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ''; // eslint-disable-next-line - const eventPath = event.composedPath - ? event.composedPath() - : event.path - ? event.path[0] - : undefined; + const eventPath = event.composedPath ? event.composedPath() : event.path; if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) { - $targetEl = $(eventPath); + $targetEl = $(eventPath[0]); } const noSwipingSelector = params.noSwipingSelector