Skip to content

Commit f5ce552

Browse files
committed
Fix: Don't set management server ID if cookie isn't set.
1 parent 8e933b7 commit f5ce552

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ui/src/permission.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ router.beforeEach((to, from, next) => {
9393
return
9494
}
9595
store.commit('SET_LOGIN_FLAG', true)
96-
store.commit('SET_MS_ID', Cookies.get('managementserverid'))
96+
const MS_ID = Cookies.get('managementserverid')
97+
if (MS_ID) {
98+
store.commit('SET_MS_ID', MS_ID)
99+
}
97100
}
98101
if (Object.keys(store.getters.apis).length === 0) {
99102
const cachedApis = vueProps.$localStorage.get(APIS, {})

0 commit comments

Comments
 (0)