Use MatrixClientPeg::safeGet in src/{stores,hooks,components/structures}/* (#10988)
This commit is contained in:
parent
707fd9ccf0
commit
dd46db4817
34 changed files with 139 additions and 130 deletions
|
@ -61,7 +61,7 @@ _td("Short keyboard patterns are easy to guess");
|
|||
* @param matrixClient the client of the logged in user, if any
|
||||
* @returns {object} Score result with `score` and `feedback` properties
|
||||
*/
|
||||
export function scorePassword(matrixClient: MatrixClient | undefined, password: string): zxcvbn.ZXCVBNResult | null {
|
||||
export function scorePassword(matrixClient: MatrixClient | null, password: string): zxcvbn.ZXCVBNResult | null {
|
||||
if (password.length === 0) return null;
|
||||
|
||||
const userInputs = ZXCVBN_USER_INPUTS.slice();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue