Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Mukuthu committed Sep 23, 2016
1 parent 0c6aaf3 commit 65e8ac8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/directives/snapscroll.js
Expand Up @@ -221,11 +221,10 @@
return;
}
if (!isNumber(current)) {
if (isNumber(previous)) {
scope.snapIndex = previous;
} else {
scope.snapIndex = 0;
if (!isNumber(previous)) {
previous = 0;
}
scope.snapIndex = previous;
return;
}
if (current % 1 !== 0) {
Expand Down

0 comments on commit 65e8ac8

Please sign in to comment.