Skip to content

Commit

Permalink
fix(hash-navigation): typos in comments and function name (#4779)
Browse files Browse the repository at this point in the history
* fix: onHashCange -> onHashChange
* fix: componenet -> component
  • Loading branch information
hiro0218 authored Jul 22, 2021
1 parent 2be958c commit 07b8dc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/core/events/onTouchStart.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function onTouchStart(event) {
if (!data.isTouchEvent && 'button' in e && e.button > 0) return;
if (data.isTouched && data.isMoved) return;

// change target el for shadow root componenet
// change target el for shadow root component
const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';
if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) {
$targetEl = $(event.path[0]);
Expand Down
6 changes: 3 additions & 3 deletions src/components/hash-navigation/hash-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import $ from '../../utils/dom';
import { bindModuleMethods } from '../../utils/utils';

const HashNavigation = {
onHashCange() {
onHashChange() {
const swiper = this;
const document = getDocument();
swiper.emit('hashChange');
Expand Down Expand Up @@ -63,14 +63,14 @@ const HashNavigation = {
}
}
if (swiper.params.hashNavigation.watchState) {
$(window).on('hashchange', swiper.hashNavigation.onHashCange);
$(window).on('hashchange', swiper.hashNavigation.onHashChange);
}
},
destroy() {
const swiper = this;
const window = getWindow();
if (swiper.params.hashNavigation.watchState) {
$(window).off('hashchange', swiper.hashNavigation.onHashCange);
$(window).off('hashchange', swiper.hashNavigation.onHashChange);
}
},
};
Expand Down

0 comments on commit 07b8dc3

Please sign in to comment.