fix: update company info on array of companies. (#227)

This commit is contained in:
Loduis Madariaga Barrios
2025-01-12 05:02:58 -05:00
committed by GitHub
parent 6031f0dbdd
commit 969cbe9ad8

View File

@@ -51,7 +51,10 @@ export const useCompanyStore = (useWindow = false) => {
})
this.selectedCompany = response.data.data
const companyIndex = this.companies.findIndex((company) => company.unique_hash === this.selectedCompany.unique_hash);
if (companyIndex !== -1) {
this.companies[companyIndex] = this.selectedCompany;
}
resolve(response)
})
.catch((err) => {