irby / passwordless-authenticator-poc

Detected the use of variables before they are defined JS-0357
Anti-pattern
Major
a year agoa year old
'renderAlternateLoginMethod' was used before it was defined
 69        }
 70
 71        if (!userInfo.has_webauthn_credential) {
 72          return renderAlternateLoginMethod(userInfo.id); 73        }
 74
 75        userID = userInfo.id;
'renderAlternateLoginMethod' was used before it was defined
 91        }
 92
 93        if (e instanceof WebauthnRequestCancelledError) {
 94          return renderAlternateLoginMethod(userID); 95        }
 96
 97        throw e;
'renderAlternateLoginMethod' was used before it was defined
106          return renderPasscode(info.id, config.password.enabled, true);
107        }
108
109        return renderAlternateLoginMethod(info.id);110      })
111      .catch((e) => {
112        if (e instanceof NotFoundError) {
'passcodeSubmit' was used before it was defined
 63  const onPasscodeInput = (digits: string[]) => {
 64    // Automatically submit the Passcode when every input contains a digit.
 65    if (digits.filter((digit) => digit !== "").length === numberOfDigits) {
 66      passcodeSubmit(digits); 67    }
 68
 69    setPasscodeDigits(digits);