Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/js/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ function wrongPassword(isError = false, isSuccess = false, data = null) {
$("#error-message").text("");
$("#error-hint").hide();
$("#error-hint").text("");
if (data !== null && "error" in data.responseJSON && "message" in data.responseJSON.error) {
if (
data &&
data.responseJSON &&
"error" in data.responseJSON &&
"message" in data.responseJSON.error
) {
// This is an error, highlight both the password and the TOTP field
isErrorResponse = true;
// Check if the error is caused by an invalid TOTP token
Expand Down