chore: minor cleanup
This commit is contained in:
parent
e235d80c25
commit
f45eb74c0f
2 changed files with 3 additions and 12 deletions
|
@ -67,20 +67,11 @@ class NowPlaying extends HTMLElement {
|
|||
}
|
||||
|
||||
get template() {
|
||||
return document
|
||||
.getElementById(nowPlayingTemplate.id)
|
||||
.content.cloneNode(true);
|
||||
return document.getElementById(nowPlayingTemplate.id).content.cloneNode(true);
|
||||
}
|
||||
|
||||
get data() {
|
||||
const data = fetch('/api/now-playing', {
|
||||
type: 'json',
|
||||
})
|
||||
.then((data) => data.json())
|
||||
.catch(() => {
|
||||
loading.style.display = 'none'
|
||||
})
|
||||
return data;
|
||||
return fetch('/api/now-playing', { type: 'json' }).then((data) => data.json()).catch((e) => {})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue