Skip to content

Commit

Permalink
Merge pull request airyland#669 from wg5945/forward
Browse files Browse the repository at this point in the history
Demo: keep consistent for the animation
  • Loading branch information
lichunqiang authored Nov 21, 2016
2 parents 3269d27 + 346da36 commit ed0ce09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ router.beforeEach(({ to, from, next }) => {
const toIndex = history.getItem(to.path)
const fromIndex = history.getItem(from.path)
if (toIndex) {
if (toIndex > fromIndex) {
if (toIndex > fromIndex || !fromIndex) {
commit('UPDATE_DIRECTION', 'forward')
} else {
commit('UPDATE_DIRECTION', 'reverse')
Expand Down

0 comments on commit ed0ce09

Please sign in to comment.