From 5ee350b66c41e3cc82702721d4a71ba27531e4b5 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Sat, 31 Aug 2024 02:17:55 +0300 Subject: [PATCH] fix: error prevention if data is null of empty --- src/pages/schedule/schedule.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pages/schedule/schedule.component.ts b/src/pages/schedule/schedule.component.ts index 57c74e3..44aa4c7 100644 --- a/src/pages/schedule/schedule.component.ts +++ b/src/pages/schedule/schedule.component.ts @@ -82,6 +82,11 @@ export class ScheduleComponent implements OnInit { throw error; })) .subscribe(x => { + if (x == undefined || x.length === 0) { + this.isLoadTable = false; + return; + } + this.data = x; switch (data[0]) { case TabsSelect.Group: