Return early if there is no current listen.
This commit is contained in:
parent
4a4188243b
commit
3426ba66c0
|
@ -1,6 +1,10 @@
|
||||||
window.addEventListener('DOMContentLoaded', async () => {
|
window.addEventListener('DOMContentLoaded', async () => {
|
||||||
const loop = async () => {
|
const loop = async () => {
|
||||||
const listen = await getCurrentListen();
|
const listen = await getCurrentListen();
|
||||||
|
if (listen === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const image = await getCoverArt(listen);
|
const image = await getCoverArt(listen);
|
||||||
insertHtml(listen, image);
|
insertHtml(listen, image);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue