diff --git a/lms/static/js/commerce/views/receipt_view.js b/lms/static/js/commerce/views/receipt_view.js index b583a39eab..5eeaa38487 100644 --- a/lms/static/js/commerce/views/receipt_view.js +++ b/lms/static/js/commerce/views/receipt_view.js @@ -288,7 +288,11 @@ function completeOrder(event) { // jshint ignore:line providerId = $(event).data("provider"), $errorContainer = $("#error-container"); - event.preventDefault(); + try { + event.preventDefault(); + } catch (err) { + // Ignore the error as not all event inputs have the preventDefault method. + } analytics.track( "edx.bi.credit.clicked_complete_credit", diff --git a/lms/templates/dashboard/_dashboard_credit_info.html b/lms/templates/dashboard/_dashboard_credit_info.html index bca86acee3..509c84c95b 100644 --- a/lms/templates/dashboard/_dashboard_credit_info.html +++ b/lms/templates/dashboard/_dashboard_credit_info.html @@ -23,8 +23,8 @@ % if not credit_status["purchased"] and not credit_status["error"] :