Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/filtered_search/services/recent_searches_service_error.js')
-rw-r--r--app/assets/javascripts/filtered_search/services/recent_searches_service_error.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/assets/javascripts/filtered_search/services/recent_searches_service_error.js b/app/assets/javascripts/filtered_search/services/recent_searches_service_error.js
index 011b37e218d..d8c2c6d79c6 100644
--- a/app/assets/javascripts/filtered_search/services/recent_searches_service_error.js
+++ b/app/assets/javascripts/filtered_search/services/recent_searches_service_error.js
@@ -1,13 +1,10 @@
import { __ } from '~/locale';
-class RecentSearchesServiceError {
+class RecentSearchesServiceError extends Error {
constructor(message) {
+ super(message || __('Recent Searches Service is unavailable'));
this.name = 'RecentSearchesServiceError';
- this.message = message || __('Recent Searches Service is unavailable');
}
}
-// Can't use `extends` for builtin prototypes and get true inheritance yet
-RecentSearchesServiceError.prototype = Error.prototype;
-
export default RecentSearchesServiceError;