소스 검색

Bug Fix: Error occurred when "arrows" option is false.

NaotoshiFujita 5 년 전
부모
커밋
a75a609961
2개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      dist/js/splide.min.js
  2. 8 1
      src/js/components/arrows/index.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/js/splide.min.js


+ 8 - 1
src/js/components/arrows/index.js

@@ -40,6 +40,13 @@ export default ( Splide, Components, name ) => {
 	 */
 	const root = Splide.root;
 
+	/**
+	 * Store Elements component.
+	 *
+	 * @type {Object}
+	 */
+	const Elements = Components.Elements;
+
 	/**
 	 * Arrows component object.
 	 *
@@ -52,7 +59,7 @@ export default ( Splide, Components, name ) => {
 		 * @return {boolean} - True if the option is true or arrow elements were found.
 		 */
 		required: Splide.options.arrows
-			|| ( Components.Elements.arrows.prev && Components.Elements.arrows.next ),
+			|| ( Elements.arrows && Elements.arrows.prev && Elements.arrows.next ),
 
 		/**
 		 * Called when the component is mounted.

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.