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/blob_edit/edit_blob.js')
-rw-r--r--app/assets/javascripts/blob_edit/edit_blob.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/assets/javascripts/blob_edit/edit_blob.js b/app/assets/javascripts/blob_edit/edit_blob.js
index ab2fc80e653..7c8d0d5ded0 100644
--- a/app/assets/javascripts/blob_edit/edit_blob.js
+++ b/app/assets/javascripts/blob_edit/edit_blob.js
@@ -1,7 +1,7 @@
import $ from 'jquery';
import EditorLite from '~/editor/editor_lite';
import { FileTemplateExtension } from '~/editor/extensions/editor_file_template_ext';
-import { deprecatedCreateFlash as createFlash } from '~/flash';
+import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { addEditorMarkdownListeners } from '~/lib/utils/text_markdown';
import { insertFinalNewline } from '~/lib/utils/text_utility';
@@ -21,7 +21,11 @@ export default class EditBlob {
this.editor.use(new MarkdownExtension());
addEditorMarkdownListeners(this.editor);
})
- .catch((e) => createFlash(`${BLOB_EDITOR_ERROR}: ${e}`));
+ .catch((e) =>
+ createFlash({
+ message: `${BLOB_EDITOR_ERROR}: ${e}`,
+ }),
+ );
}
this.initModePanesAndLinks();
@@ -94,7 +98,11 @@ export default class EditBlob {
currentPane.empty().append(data);
currentPane.renderGFM();
})
- .catch(() => createFlash(BLOB_PREVIEW_ERROR));
+ .catch(() =>
+ createFlash({
+ message: BLOB_PREVIEW_ERROR,
+ }),
+ );
}
this.$toggleButton.show();