Commit c09b5852 authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: Remove new keyword from Flash calls.

parent 6c3723d2
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
this.noteType = type; this.noteType = type;
}, },
handleError() { handleError() {
new Flash('Something went wrong while adding your comment. Please try again.'); // eslint-disable-line Flash('Something went wrong while adding your comment. Please try again.');
}, },
editMyLastNote() { editMyLastNote() {
if (this.note === '') { if (this.note === '') {
......
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
this.isReplying = false; this.isReplying = false;
}) })
.catch(() => { .catch(() => {
new Flash('Something went wrong while adding your reply. Please try again.'); // eslint-disable-line Flash('Something went wrong while adding your reply. Please try again.');
}); });
}, },
}, },
......
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
$(this.$refs.noteBody.$el).renderGFM(); $(this.$refs.noteBody.$el).renderGFM();
}) })
.catch(() => { .catch(() => {
new Flash('Something went wrong while editing your comment. Please try again.'); // eslint-disable-line Flash('Something went wrong while editing your comment. Please try again.');
}); });
}, },
formCancelHandler(shouldConfirm) { formCancelHandler(shouldConfirm) {
......
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
$(this.$el).find('.award-control').tooltip('fixTitle'); $(this.$el).find('.award-control').tooltip('fixTitle');
}) })
.catch(() => { .catch(() => {
new Flash('Something went wrong on our end.'); // eslint-disable-line Flash('Something went wrong on our end.');
}); });
}, },
}, },
......
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
}); });
}) })
.catch(() => { .catch(() => {
new Flash('Something went wrong while fetching issue comments. Please try again.'); // eslint-disable-line Flash('Something went wrong while fetching issue comments. Please try again.');
}); });
}, },
initPolling() { initPolling() {
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
this.$store.commit('setLastFetchedAt', res.lastFetchedAt); this.$store.commit('setLastFetchedAt', res.lastFetchedAt);
}) })
.catch(() => { .catch(() => {
new Flash('Something went wrong while fetching latest comments.'); // eslint-disable-line Flash('Something went wrong while fetching latest comments.');
}); });
}, 15000); }, 15000);
}, },
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
this.$store.dispatch('toggleAward', { endpoint, awardName, noteId }) this.$store.dispatch('toggleAward', { endpoint, awardName, noteId })
.catch(() => { .catch(() => {
new Flash('Something went wrong on our end.'); // eslint-disable-line Flash('Something went wrong on our end.');
}); });
}); });
......
...@@ -230,7 +230,7 @@ const actions = { ...@@ -230,7 +230,7 @@ const actions = {
if (hasQuickActions && Object.keys(errors).length) { if (hasQuickActions && Object.keys(errors).length) {
context.dispatch('poll'); context.dispatch('poll');
$('.js-gfm-input').trigger('clear-commands-cache.atwho'); $('.js-gfm-input').trigger('clear-commands-cache.atwho');
new Flash('Commands applied', 'notice', $(noteData.flashContainer)); // eslint-disable-line Flash('Commands applied', 'notice', $(noteData.flashContainer));
} }
if (commandsChanges && commandsChanges.emoji_award) { if (commandsChanges && commandsChanges.emoji_award) {
...@@ -241,12 +241,12 @@ const actions = { ...@@ -241,12 +241,12 @@ const actions = {
awardsHandler.scrollToAwards(); awardsHandler.scrollToAwards();
}).catch(() => { }).catch(() => {
const msg = 'Something went wrong while adding your award. Please try again.'; const msg = 'Something went wrong while adding your award. Please try again.';
new Flash(msg, $(noteData.flashContainer)); // eslint-disable-line Flash(msg, $(noteData.flashContainer));
}); });
} }
if (errors && errors.commands_only) { if (errors && errors.commands_only) {
new Flash(errors.commands_only, 'notice', $(noteData.flashContainer)); // eslint-disable-line Flash(errors.commands_only, 'notice', $(noteData.flashContainer));
} }
context.commit('removePlaceholderNotes'); context.commit('removePlaceholderNotes');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment