Skip to content

Commit

Permalink
PM-14379: Stop storing 'null' in as the word separator (#4219)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-livefront authored Nov 1, 2024
1 parent 2eb41e9 commit 9240fb8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ class GeneratorViewModel @Inject constructor(
GeneratorState.MainType.Passphrase(
numWords = max(options.numWords, minNumWords),
minNumWords = minNumWords,
wordSeparator = options.wordSeparator.toCharArray().first(),
wordSeparator = options.wordSeparator.toCharArray().firstOrNull(),
capitalize = options.allowCapitalize || policy.capitalize == true,
capitalizeEnabled = policy.capitalize != true,
includeNumber = options.allowIncludeNumber || policy.includeNumber == true,
Expand Down Expand Up @@ -462,7 +462,7 @@ class GeneratorViewModel @Inject constructor(
val newOptions = options.copy(
type = PasscodeGenerationOptions.PasscodeType.PASSPHRASE,
numWords = passphrase.numWords,
wordSeparator = passphrase.wordSeparator.toString(),
wordSeparator = passphrase.wordSeparator?.toString().orEmpty(),
allowCapitalize = passphrase.capitalize,
allowIncludeNumber = passphrase.includeNumber,
)
Expand Down

0 comments on commit 9240fb8

Please sign in to comment.