fix: error prevention if data is null of empty

This commit is contained in:
Polianin Nikita 2024-08-31 02:17:55 +03:00
parent 578fdff6ca
commit 5ee350b66c

View File

@ -82,6 +82,11 @@ export class ScheduleComponent implements OnInit {
throw error; throw error;
})) }))
.subscribe(x => { .subscribe(x => {
if (x == undefined || x.length === 0) {
this.isLoadTable = false;
return;
}
this.data = x; this.data = x;
switch (data[0]) { switch (data[0]) {
case TabsSelect.Group: case TabsSelect.Group: