From 2ddf78f46fc635291a465b9c436b81798b776099 Mon Sep 17 00:00:00 2001 From: iou1name Date: Mon, 5 Oct 2020 10:52:51 -0400 Subject: [PATCH] changing artist clears trackList --- static/scorch.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/scorch.js b/static/scorch.js index 47f6191..14241a5 100644 --- a/static/scorch.js +++ b/static/scorch.js @@ -64,6 +64,10 @@ function artist_albums_recv(data) { while (albums_list.firstChild) { albums_list.removeChild(albums_list.lastChild); } + let track_list = document.querySelector('#trackList'); + while (track_list.firstChild) { + track_list.removeChild(track_list.firstChild); + } for (let album of data) { let option = document.createElement('option'); option.value = album['album'];