diff --git a/lms/static/js/student_account/views/LoginView.js b/lms/static/js/student_account/views/LoginView.js index 9b7ce2e19908..0bf8fa854903 100644 --- a/lms/static/js/student_account/views/LoginView.js +++ b/lms/static/js/student_account/views/LoginView.js @@ -268,7 +268,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); }