소스 검색

Bug Fix: Fix the wrong condition to save the event.

Naotoshi Fujita 2 년 전
부모
커밋
e32aca9b0e
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      src/js/components/Drag/Drag.ts

+ 5 - 2
src/js/components/Drag/Drag.ts

@@ -159,7 +159,10 @@ export const Drag: ComponentConstructor<DragComponent> = ( Splide, Components, o
         const expired     = diffTime( e ) > LOG_INTERVAL;
         const hasExceeded = exceeded !== ( exceeded = exceededLimit() );
 
-        expired || hasExceeded && save( e );
+        if ( expired || hasExceeded ) {
+          save( e );
+        }
+
         clickPrevented = true;
         emit( EVENT_DRAGGING );
         prevent( e );
@@ -191,7 +194,7 @@ export const Drag: ComponentConstructor<DragComponent> = ( Splide, Components, o
 
     binder.destroy();
     dragging = false;
-    exceeded = false;
+    // exceeded = false;
   }
 
   /**