Skip to content

Commit a29cec5

Browse files
authored
Merge pull request #831 from bcgov/DDS-1287-Admin-Panel
Fix for infinite loading bug
2 parents 393457b + ca81449 commit a29cec5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

frontend/src/store/modules/organization.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,13 @@ const actions = {
154154
},
155155

156156
getUserOrgs({ commit }) {
157-
commit('setUserOrgsLoading', {userOrgsLoading: true});
158157
if (state.userOrgs.length == 0) {
158+
commit('setUserOrgsLoading', {userOrgsLoading: true});
159159
ckanServ.getUserOrgList().then((data) => {
160160
commit('setUserOrgList', { orgList: data });
161+
commit('setUserOrgsLoading', {userOrgsLoading: false});
162+
}).catch((e) => {
163+
commit('setUserOrgsLoading', { userOrgsLoading: false });
161164
});
162165
}
163166
},
@@ -262,7 +265,6 @@ const mutations = {
262265
}
263266

264267
state.userOrgs = JSON.parse(JSON.stringify(userOrgs));
265-
state.userOrgsLoading = false;
266268
},
267269

268270
setCurrentNotUnmod(state, {group}) {

0 commit comments

Comments
 (0)