Skip to content

Commit

Permalink
fix: response non object type of data
Browse files Browse the repository at this point in the history
  • Loading branch information
RFbkak37y3kIY committed Sep 9, 2022
1 parent ac33fd9 commit 8e545ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/pages/home.page/home.page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
"
>
<ng-container
*ngIf="details.length === 0; else hasData"
*ngIf="details?.length === 0; else hasData"
>
<h1 *ngIf="!isLoadingDetails && readyToWork">No Data</h1>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/home.page/home.page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class HomePageComponent implements OnInit {
formatData(data: any) {
data = data || { meta: [], data: [] };
console.log(data);
if (typeof data === 'string') {
if (typeof data !== 'object') {
this.details = data;
} else {
this.columns = data.meta?.map((i: any) => i.name);
Expand Down

0 comments on commit 8e545ff

Please sign in to comment.