Skip to content

Commit 04dafe9

Browse files
committed
[FIX] web_select_all_companies: avoid to insert duplicated company ids in allowed_company_ids context
1 parent 6d3312e commit 04dafe9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web_select_all_companies/static/src/js/switch_all_company_menu.esm.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ patch(SwitchCompanyMenu.prototype, "SwitchAllCompanyMenu", {
3131
}, this.constructor.toggleDelay);
3232
} else {
3333
// Select all
34-
this.state.companiesToToggle = [this.allCompanyIds];
34+
this.state.companiesToToggle = [this.allCompanyIds.filter(x =>
35+
!this.companyService.allowedCompanyIds.includes(x))];
3536
this.isAllCompaniesSelected = true;
3637
browser.clearTimeout(this.toggleTimer);
3738
this.toggleTimer = browser.setTimeout(() => {

0 commit comments

Comments
 (0)