diff --git a/lms/static/js/instructor_dashboard/instructor_dashboard.js b/lms/static/js/instructor_dashboard/instructor_dashboard.js index b617bb8144..8c1d564769 100644 --- a/lms/static/js/instructor_dashboard/instructor_dashboard.js +++ b/lms/static/js/instructor_dashboard/instructor_dashboard.js @@ -181,9 +181,6 @@ such that the value can be defined later than this assignment (file load order). }, { constructor: window.InstructorDashboard.sections.Email, $element: idashContent.find('.' + CSS_IDASH_SECTION + '#send_email') - }, { - constructor: window.InstructorDashboard.sections.InstructorAnalytics, - $element: idashContent.find('.' + CSS_IDASH_SECTION + '#instructor_analytics') }, { constructor: window.InstructorDashboard.sections.Metrics, $element: idashContent.find('.' + CSS_IDASH_SECTION + '#metrics') @@ -220,7 +217,11 @@ such that the value can be defined later than this assignment (file load order). constructor = _arg.constructor; $element = _arg.$element; return plantTimeout(0, sectionsHaveLoaded.waitFor(function() { - return new constructor($element); + if ($element[0]) { + return new constructor($element); + } else { + return null; + } })); }); };