diff --git a/lms/static/js/student_account/views/LoginView.js b/lms/static/js/student_account/views/LoginView.js index 2d5126709db2..0a859e2275ee 100644 --- a/lms/static/js/student_account/views/LoginView.js +++ b/lms/static/js/student_account/views/LoginView.js @@ -267,7 +267,9 @@ this.clearFormErrors(); this.renderThirdPartyAuthWarning(); } - window.location.href = redirectURL; + if (typeof redirectURL === "string" && redirectURL.length) { + window.location.href = redirectURL; + } } else { this.renderErrors(this.defaultFormErrorsTitle, this.errors); }