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/protected_tags/protected_tag_edit.js')
-rw-r--r--app/assets/javascripts/protected_tags/protected_tag_edit.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/assets/javascripts/protected_tags/protected_tag_edit.js b/app/assets/javascripts/protected_tags/protected_tag_edit.js
index 157ac1c7ebd..ae7855d4638 100644
--- a/app/assets/javascripts/protected_tags/protected_tag_edit.js
+++ b/app/assets/javascripts/protected_tags/protected_tag_edit.js
@@ -1,7 +1,7 @@
import { deprecatedCreateFlash as flash } from '../flash';
import axios from '../lib/utils/axios_utils';
+import { FAILED_TO_UPDATE_TAG_MESSAGE } from './constants';
import ProtectedTagAccessDropdown from './protected_tag_access_dropdown';
-import { __ } from '~/locale';
export default class ProtectedTagEdit {
constructor(options) {
@@ -48,11 +48,8 @@ export default class ProtectedTagEdit {
.catch(() => {
this.$allowedToCreateDropdownButton.enable();
- flash(
- __('Failed to update tag!'),
- 'alert',
- document.querySelector('.js-protected-tags-list'),
- );
+ window.scrollTo({ top: 0, behavior: 'smooth' });
+ flash(FAILED_TO_UPDATE_TAG_MESSAGE);
});
}
}