@overmap-ai/core 1.0.27 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4862,12 +4862,15 @@ var __publicField = (obj, key, value) => {
4862
4862
  store.dispatch(setCurrentUser(data.user));
4863
4863
  const organizationsData = data.organizations;
4864
4864
  store.dispatch(setOrganizations(organizationsData));
4865
+ const activeOrganizationId = store.getState().organizationReducer.activeOrganizationId;
4865
4866
  const firstOrg = organizationsData[0];
4866
4867
  const currProjObj = projects.find((project) => project.id === currentProjectId);
4867
4868
  const isOrgProject = !!(currProjObj == null ? void 0 : currProjObj.owner_organization);
4868
4869
  const userIsInProjectOrg = isOrgProject && organizationsData.some((organization) => organization.id === currProjObj.owner_organization);
4869
4870
  let currentOrgId = null;
4870
- if (userIsInProjectOrg) {
4871
+ if (activeOrganizationId) {
4872
+ currentOrgId = activeOrganizationId;
4873
+ } else if (userIsInProjectOrg) {
4871
4874
  currentOrgId = currProjObj.owner_organization;
4872
4875
  } else if (firstOrg) {
4873
4876
  currentOrgId = firstOrg.id;