Prechádzať zdrojové kódy

Bug Fix: "child" function didn't split a given class name.

NaotoshiFujita 5 rokov pred
rodič
commit
9bf1248a25

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/js/splide.min.js


+ 3 - 0
src/js/components/elements/index.js

@@ -77,6 +77,9 @@ export default ( Splide ) => {
 				next: find( arrows, `.${ classes.next }` ),
 			};
 
+			console.log( arrows );
+			console.log( this.arrows );
+
 			const autoplay = findParts( classes.autoplay );
 			this.bar   = find( findParts( classes.progress ), `.${ classes.bar }` );
 			this.play  = find( autoplay, `.${ classes.play }` );

+ 1 - 1
src/js/utils/dom.js

@@ -35,7 +35,7 @@ export function child( parent, className ) {
 		for ( let i in children ) {
 			const child = children[ i ];
 
-			if ( hasClass( child, className ) ) {
+			if ( hasClass( child, className.split( ' ' )[ 0 ] ) ) {
 				return child;
 			}
 		}

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov