Explorar o código

Bug Fix: Failed to include the first slide while checking the end index.

Naotoshi Fujita %!s(int64=2) %!d(string=hai) anos
pai
achega
50e342d8ec
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/js/components/Controller/Controller.ts

+ 1 - 1
src/js/components/Controller/Controller.ts

@@ -298,7 +298,7 @@ export function Controller( Splide: Splide, Components: Components, options: Opt
   function getEnd(): number {
     let end = slideCount - ( hasFocus() || ( isLoop && perMove ) ? 1 : perPage );
 
-    while ( compact && --end > 0 ) {
+    while ( compact && end-- > 0 ) {
       if ( toPosition( slideCount - 1, true ) !== toPosition( end, true ) ) {
         end++;
         break;