fix: Jwt context.features to work without context.user. Fixes #12005

This commit is contained in:
damencho 2022-08-18 11:37:34 -05:00 committed by Дамян Минков
parent 61df6f6794
commit 41a6cbd3fc
1 changed files with 4 additions and 2 deletions

View File

@ -150,8 +150,10 @@ function _setJWT(store, next, action) {
action.tenant = context.tenant || sub || undefined;
action.user = user;
user && _overwriteLocalParticipant(
store, { ...user,
const newUser = user ? { ...user } : {};
_overwriteLocalParticipant(
store, { ...newUser,
features: context.features });
}
}