Skip to content

Commit

Permalink
Fix path ends with /
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Nov 13, 2017
1 parent 3071026 commit 03261fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/history/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const History = {
swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);
},
getPathValues() {
const pathArray = window.location.pathname.slice(1).split('/');
const pathArray = window.location.pathname.slice(1).split('/').filter(part => part !== '');
const total = pathArray.length;
const key = pathArray[total - 2];
const value = pathArray[total - 1];
Expand Down

0 comments on commit 03261fb

Please sign in to comment.