Skip to content

Commit

Permalink
Simplify code in PlusButtonComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
tkleinke committed Mar 3, 2025
1 parent a5d2c3a commit ca45855
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ export class PlusButtonComponent implements OnInit, OnChanges, OnDestroy {

if (this.topLevelCategoriesArray.length === 0) return 'none';

if (this.topLevelCategoriesArray.length === 1
&& (!this.topLevelCategoriesArray[0].children || this.topLevelCategoriesArray[0].children.length === 0)) {
if (this.topLevelCategoriesArray.length === 1 && !this.topLevelCategoriesArray[0].children?.length) {
return 'singleCategory';
}

Expand Down

0 comments on commit ca45855

Please sign in to comment.