1
Fork 0

Return early if there is no current listen.

This commit is contained in:
Bauke 2022-03-28 21:10:02 +02:00
parent 4a4188243b
commit 3426ba66c0
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,10 @@
window.addEventListener('DOMContentLoaded', async () => {
const loop = async () => {
const listen = await getCurrentListen();
if (listen === undefined) {
return;
}
const image = await getCoverArt(listen);
insertHtml(listen, image);
};