diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/assets/javascripts/notes/components/comment_form.vue | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/assets/javascripts/notes/components/comment_form.vue')
-rw-r--r-- | app/assets/javascripts/notes/components/comment_form.vue | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 0d7ff022f8f..2ccb9a0b514 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -7,7 +7,7 @@ import Autosave from '~/autosave'; import { refreshUserMergeRequestCounts } from '~/commons/nav/user_merge_requests'; import { createAlert } from '~/flash'; import { badgeState } from '~/issuable/components/status_box.vue'; -import httpStatusCodes from '~/lib/utils/http_status'; +import { HTTP_STATUS_UNPROCESSABLE_ENTITY } from '~/lib/utils/http_status'; import { capitalizeFirstCharacter, convertToCamelCase, @@ -28,8 +28,6 @@ import CommentTypeDropdown from './comment_type_dropdown.vue'; import DiscussionLockedWidget from './discussion_locked_widget.vue'; import NoteSignedOutWidget from './note_signed_out_widget.vue'; -const { UNPROCESSABLE_ENTITY } = httpStatusCodes; - export default { name: 'CommentForm', i18n: COMMENT_FORM, @@ -198,7 +196,7 @@ export default { 'toggleIssueLocalState', ]), handleSaveError({ data, status }) { - if (status === UNPROCESSABLE_ENTITY && data.errors?.commands_only?.length) { + if (status === HTTP_STATUS_UNPROCESSABLE_ENTITY && data.errors?.commands_only?.length) { this.errors = data.errors.commands_only; } else { this.errors = [this.$options.i18n.GENERIC_UNSUBMITTABLE_NETWORK]; |