Skip to content

Commit

Permalink
feat: only show top level when multiple location entity (#1162)
Browse files Browse the repository at this point in the history
* feat: only show top level when multiple location entity

* lint fix
  • Loading branch information
anishfyle committed Jan 23, 2025
1 parent aa579ef commit 544614b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ export class IntacctLocationEntityComponent implements OnInit {
workspace: this.workspaceId,
detail: {}
};
this.locationEntityOptions = [topLevelOption].concat(locationEntities);

// Only add top level option if there are multiple location entities
this.locationEntityOptions = locationEntities.length > 1
? [topLevelOption].concat(locationEntities)
: locationEntities;

this.setupLocationEntityMapping();
});
}
Expand Down

0 comments on commit 544614b

Please sign in to comment.