Skip to content

Commit

Permalink
OLMIS-8010: Added a condition for putAll function for local storage (#39
Browse files Browse the repository at this point in the history
)
  • Loading branch information
saleksandra authored Sep 4, 2024
1 parent c37e6d5 commit 91e60c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
==================
Bug fixes:
* [OLMIS-7931](https://openlmis.atlassian.net/browse/OLMIS-7931): Fix imports for layout-ui jenkins job
* [OLMIS-8010](https://openlmis.atlassian.net/browse/OLMIS-8010): Added a condition for putAll function for local storage

New Functionalities:
* [OLMIS-7976](https://openlmis.atlassian.net/browse/OLMIS-7976): Improved visual apperance of the homepage alerts component
Expand Down
2 changes: 1 addition & 1 deletion src/openlmis-local-storage/local-storage.factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
if (Array.isArray(collectionToStore) && collectionToStore.length > 0) {
executeWithStorageUpdate(function() {
items = collectionToStore.map(function(item) {
if (item.id) {
if (item !== undefined && item.id) {
removeItemBy('id', item.id);
}
return typeof item === 'object' ? JSON.parse(JSON.stringify(item)) : item;
Expand Down

0 comments on commit 91e60c4

Please sign in to comment.