Fixed issue with undefined el

This commit is contained in:
Eliot Berriot 2019-04-29 15:28:13 +02:00
parent e34a90314f
commit 4f7052f589
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
1 changed files with 2 additions and 1 deletions

View File

@ -357,7 +357,8 @@ export default {
this.$nextTick(() => {
self.bindEvents()
if (self.tracks.length > 0) {
var topPos = document.getElementById(`queue-item-${v}`).offsetTop;
let el = document.getElementById(`queue-item-${v}`);
var topPos = el.offsetTop;
document.getElementById('queue').scrollTop = topPos-10;
}
})