Skip to content

Commit

Permalink
hotfix: unlock receive (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
olewandowski1 authored Jun 27, 2024
1 parent f65893a commit c6158fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
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 && item.id) {
removeItemBy('id', item.id);
}
return typeof item === 'object' ? JSON.parse(JSON.stringify(item)) : item;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@

return orderableFulfillJson;
}
});
})
.filter(Boolean);

orderableFulfillsOffline.putAll(orderableFulfillsToStore);

Expand Down
3 changes: 2 additions & 1 deletion src/referencedata-program/program.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@
var programsToStore = programs.map(function(program) {
program.userIdOffline = userId;
return program;
});
})
.filter(Boolean);

userProgramsCache.putAll(programsToStore);

Expand Down

0 comments on commit c6158fe

Please sign in to comment.