From df09765ee152f3958fdacb950bf1e7e6dcba6b9a Mon Sep 17 00:00:00 2001 From: John Hensley Date: Thu, 1 Feb 2018 12:45:17 -0500 Subject: [PATCH] Address eslint complaints --- .../course_search/js/collections/search_collection.js | 9 ++++++--- .../static/course_search/js/views/search_results_view.js | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/openedx/features/course_search/static/course_search/js/collections/search_collection.js b/openedx/features/course_search/static/course_search/js/collections/search_collection.js index 2f1471fac0..778fa9bd9f 100644 --- a/openedx/features/course_search/static/course_search/js/collections/search_collection.js +++ b/openedx/features/course_search/static/course_search/js/collections/search_collection.js @@ -45,9 +45,11 @@ }, error: function(self, response) { if (response.responseJSON && response.responseJSON.error) { - self.errorMessage = response.responseJSON.error || ''; // eslint-disable-line no-param-reassign + // eslint-disable-next-line no-param-reassign + self.errorMessage = response.responseJSON.error || ''; } else { - self.errorMessage = ''; // eslint-disable-line no-param-reassign + // eslint-disable-next-line no-param-reassign + self.errorMessage = ''; } self.trigger('error'); @@ -73,7 +75,8 @@ }, error: function(self, response) { if (response.responseJSON && response.responseJSON.error) { - self.errorMessage = response.responseJSON.error || ''; // eslint-disable-line no-param-reassign + // eslint-disable-next-line no-param-reassign + self.errorMessage = response.responseJSON.error || ''; } else { self.errorMessage = ''; // eslint-disable-line no-param-reassign } diff --git a/openedx/features/course_search/static/course_search/js/views/search_results_view.js b/openedx/features/course_search/static/course_search/js/views/search_results_view.js index 5d7bf188b1..990d3f8635 100644 --- a/openedx/features/course_search/static/course_search/js/views/search_results_view.js +++ b/openedx/features/course_search/static/course_search/js/views/search_results_view.js @@ -93,7 +93,11 @@ }, showErrorMessage: function() { - HtmlUtils.setHtml(this.$el, HtmlUtils.template(this.errorTemplate)({errorMessage: this.collection.errorMessage})); + HtmlUtils.setHtml( + this.$el, + HtmlUtils.template(this.errorTemplate)({ + errorMessage: this.collection.errorMessage + })); this.showResults(); },