Skip to content

Commit

Permalink
[explorer] task: refactor on hideEmptyData logic
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyLaw committed Oct 21, 2022
1 parent 5277417 commit c61a7e7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/views/PageAssembler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,8 @@ export default {
return false;
}
if (item.hideEmptyData) {
const data = this.getData(item);
if (Array.isArray(data)) {
return !!data.length;
} else {
return !!Object.keys(data).length
}
if (item.hideEmptyData && Object.keys(this.getData(item)).length === 0) {
return false;
}
if (item.hideOnError && this.getter(item.managerGetter)?.error) {
Expand Down

0 comments on commit c61a7e7

Please sign in to comment.