Browse Source

fix: avoid overriding extra user props

pull/7392/head
Pranav C 11 months ago
parent
commit
0ff19b7317
  1. 2
      packages/nc-gui/composables/useGlobal/index.ts

2
packages/nc-gui/composables/useGlobal/index.ts

@ -66,6 +66,8 @@ export const useGlobal = createGlobalState((): UseGlobalReturn => {
(nextPayload) => {
if (nextPayload) {
state.user.value = {
// keep existing props if user id same as before
...(state.user.value?.id === nextPayload.id ? state.user.value || {} : {}),
id: nextPayload.id,
email: nextPayload.email,
firstname: nextPayload.firstname,

Loading…
Cancel
Save