mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
fix(editor): Handle null object on saving user settings (no-changelog) (#6341)
deal with null settings
This commit is contained in:
parent
f5ac3f4fa9
commit
3b1a2f88b8
|
@ -187,7 +187,10 @@ export default defineComponent({
|
|||
},
|
||||
async onAllowSSOManualLogin(userId: string) {
|
||||
const user = this.usersStore.getUserById(userId) as IUser | null;
|
||||
if (user?.settings) {
|
||||
if (user) {
|
||||
if (!user.settings) {
|
||||
user.settings = {};
|
||||
}
|
||||
user.settings.allowSSOManualLogin = true;
|
||||
await this.usersStore.updateOtherUserSettings(userId, user.settings);
|
||||
|
||||
|
|
Loading…
Reference in a new issue