refactor: improve error handling

This commit is contained in:
4gray committed 2023-07-09 21:58:44 +02:00
1 parent 1624a3d169
commit ac78962bd4
1 file changed
+8 -6
+8 -6
View File
@@ -31,12 +31,14 @@ export class EpgService {
if (!Array.isArray(urls)) {
urls = [urls];
}
urls.forEach((url) =>
this.electronService.sendIpcEvent(EPG_FETCH, {
url,
})
);
this.showFetchSnackbar();
if (urls?.length > 0) {
urls.forEach((url) =>
this.electronService.sendIpcEvent(EPG_FETCH, {
url,
})
);
this.showFetchSnackbar();
}
}
showFetchSnackbar() {