mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
fix: update company info on array of companies. (#227)
This commit is contained in:
committed by
GitHub
parent
6031f0dbdd
commit
969cbe9ad8
5
resources/scripts/admin/stores/company.js
vendored
5
resources/scripts/admin/stores/company.js
vendored
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user