Actually fix the playlist navigation

This commit is contained in:
Preston 2020-08-08 18:08:22 -04:00
parent 49342dd75b
commit 07f35da5be
1 changed files with 3 additions and 1 deletions

View File

@ -70,12 +70,14 @@ export default Vue.extend({
}) })
const oldVideoIndex = this.randomizedPlaylistItems.findIndex((item) => { const oldVideoIndex = this.randomizedPlaylistItems.findIndex((item) => {
return item === this.oldId return item === oldId
}) })
if ((newVideoIndex - 1) !== oldVideoIndex) { if ((newVideoIndex - 1) !== oldVideoIndex) {
// User clicked a different video than expected. Re-shuffle the list // User clicked a different video than expected. Re-shuffle the list
console.log(this.randomizedPlaylistItems)
this.shufflePlaylistItems() this.shufflePlaylistItems()
console.log(this.randomizedPlaylistItems)
} }
} }
} }