From 443af201edac771b2bb2644318eb103d9589dcb0 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 14 Oct 2025 20:34:55 +0300 Subject: [PATCH] fix generate password special characters null --- .../views/user/fields/generate-password.js | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/client/src/views/user/fields/generate-password.js b/client/src/views/user/fields/generate-password.js index 9e72638c9e..b6b88b3f91 100644 --- a/client/src/views/user/fields/generate-password.js +++ b/client/src/views/user/fields/generate-password.js @@ -63,26 +63,26 @@ class UserGeneratePasswordFieldView extends BaseFieldView { this.strengthParams = this.options.strengthParams || {}; - this.passwordStrengthLength = this.strengthParams.passwordStrengthLength || - this.getConfig().get('passwordStrengthLength'); + this.passwordStrengthLength = this.strengthParams.passwordStrengthLength ?? + this.getConfig().get('passwordStrengthLength') ?? null; - this.passwordStrengthLetterCount = this.strengthParams.passwordStrengthLetterCount || - this.getConfig().get('passwordStrengthLetterCount'); + this.passwordStrengthLetterCount = this.strengthParams.passwordStrengthLetterCount ?? + this.getConfig().get('passwordStrengthLetterCount') ?? null; - this.passwordStrengthNumberCount = this.strengthParams.passwordStrengthNumberCount || - this.getConfig().get('passwordStrengthNumberCount'); + this.passwordStrengthNumberCount = this.strengthParams.passwordStrengthNumberCount ?? + this.getConfig().get('passwordStrengthNumberCount') ?? null; - this.passwordStrengthSpecialCharacterCount = this.strengthParams.passwordStrengthSpecialCharacterCount || - this.getConfig().get('passwordStrengthSpecialCharacterCount'); + this.passwordStrengthSpecialCharacterCount = this.strengthParams.passwordStrengthSpecialCharacterCount ?? + this.getConfig().get('passwordStrengthSpecialCharacterCount') ?? null; - this.passwordGenerateLength = this.strengthParams.passwordGenerateLength || - this.getConfig().get('passwordGenerateLength'); + this.passwordGenerateLength = this.strengthParams.passwordGenerateLength ?? + this.getConfig().get('passwordGenerateLength') ?? null; - this.passwordGenerateLetterCount = this.strengthParams.passwordGenerateLetterCount || - this.getConfig().get('passwordGenerateLetterCount'); + this.passwordGenerateLetterCount = this.strengthParams.passwordGenerateLetterCount ?? + this.getConfig().get('passwordGenerateLetterCount') ?? null; - this.passwordGenerateNumberCount = this.strengthParams.passwordGenerateNumberCount || - this.getConfig().get('passwordGenerateNumberCount'); + this.passwordGenerateNumberCount = this.strengthParams.passwordGenerateNumberCount ?? + this.getConfig().get('passwordGenerateNumberCount') ?? null; } fetch() {