Check if tbody is present and create it if doesn't.
This commit is contained in:
parent
6b1f2e76e3
commit
341ea73e97
@ -23,6 +23,9 @@ function updateLastPlayedSong() {
|
||||
.then(last_played => {
|
||||
if (last_played.time == $('last-played').firstChild.lastChild.firstChild.innerText)
|
||||
return;
|
||||
|
||||
if ($('last-played').firstChild === null)
|
||||
$('last-played').appendChild(document.createElement("tbody"))
|
||||
|
||||
if ($('last-played').firstChild.children.length == 10)
|
||||
$('last-played').firstChild.firstChild.remove();
|
||||
|
Loading…
Reference in New Issue
Block a user