Skip to content

Commit

Permalink
fix: home org in persistance file
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Sep 13, 2022
1 parent 766d8e0 commit ffaf97d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/datalayer/persistance.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const subscribeToStoreOnDataLayer = async (storeId) => {

const homeOrg = await Organization.getHomeOrg();

if ([homeOrg.orgUid, homeOrg.registryId].includes(storeId)) {
if (homeOrg && [(homeOrg.orgUid, homeOrg.registryId)].includes(storeId)) {
logger.info(`Cant subscribe to self: ${storeId}`);
return { success: true };
}
Expand Down
1 change: 1 addition & 0 deletions src/datalayer/syncService.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ const dataLayerWasUpdated = async () => {
const updatedHomeInfo = updateStoreInfo.find(
(info) => info.storeId === homeOrg.registryId,
);

if (updatedHomeInfo.rootHash !== homeOrg.registryHash) {
await Staging.destroy({ where: { isTransfer: true } });
}
Expand Down

0 comments on commit ffaf97d

Please sign in to comment.