From 6575e44cae996d484cbba87a078022768a116db9 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 21 Jun 2021 03:10:27 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../javascripts/protected_branches/protected_branch_create.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/assets/javascripts/protected_branches') diff --git a/app/assets/javascripts/protected_branches/protected_branch_create.js b/app/assets/javascripts/protected_branches/protected_branch_create.js index 726ddba1014..d0d2c1400a7 100644 --- a/app/assets/javascripts/protected_branches/protected_branch_create.js +++ b/app/assets/javascripts/protected_branches/protected_branch_create.js @@ -1,6 +1,6 @@ import $ from 'jquery'; import CreateItemDropdown from '~/create_item_dropdown'; -import { deprecatedCreateFlash as Flash } from '~/flash'; +import createFlash from '~/flash'; import AccessorUtilities from '~/lib/utils/accessor'; import axios from '~/lib/utils/axios_utils'; import { __ } from '~/locale'; @@ -135,6 +135,10 @@ export default class ProtectedBranchCreate { .then(() => { window.location.reload(); }) - .catch(() => Flash(__('Failed to protect the branch'))); + .catch(() => + createFlash({ + message: __('Failed to protect the branch'), + }), + ); } } -- cgit v1.2.3