mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix: settings reset the memorized metadata.
This commit is contained in:
@@ -201,4 +201,11 @@ export default class MetableStore implements IMetableStore{
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the momerized metadata.
|
||||
*/
|
||||
resetMetadata() {
|
||||
this.metadata = [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export default class MetableDBStore extends MetableStore implements IMetableStor
|
||||
this.saveInserted(this.metadata),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saves the updated metadata.
|
||||
* @param {IMetadata[]} metadata -
|
||||
@@ -155,6 +155,8 @@ export default class MetableDBStore extends MetableStore implements IMetableStor
|
||||
const metadata = await this.repository.all();
|
||||
const mappedMetadata = this.mapMetadataCollection(metadata);
|
||||
|
||||
this.resetMetadata();
|
||||
|
||||
mappedMetadata.forEach((meta: IMetadata) => {
|
||||
this.metadata.push(meta);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user