Fix: Do not load children if there are none

pull/16/head
Juraj Nyíri 4 years ago
parent 2f4adbb26f
commit 7e3accbdcb

@ -19423,7 +19423,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
}
}, 200);
}
if (this.plex) {
if (this.plex && data.childCount > 0) {
this.seasonElemFreshlyLoaded = true;
const seasonsData = await this.plex.getLibraryData(data.key.split('/')[3]);
if (this.seasonsElem) {

@ -294,7 +294,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
}
}, 200);
}
if (this.plex) {
if (this.plex && data.childCount > 0) {
this.seasonElemFreshlyLoaded = true;
const seasonsData = await this.plex.getLibraryData(data.key.split('/')[3]);
if (this.seasonsElem) {

Loading…
Cancel
Save