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 {
this.noteType = type;
},
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() {
if (this.note === '') {
......
......@@ -97,7 +97,7 @@ export default {
this.isReplying = false;
})
.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 {
$(this.$refs.noteBody.$el).renderGFM();
})
.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) {
......
......@@ -154,7 +154,7 @@ export default {
$(this.$el).find('.award-control').tooltip('fixTitle');
})
.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 {
});
})
.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() {
......@@ -82,7 +82,7 @@ export default {
this.$store.commit('setLastFetchedAt', res.lastFetchedAt);
})
.catch(() => {
new Flash('Something went wrong while fetching latest comments.'); // eslint-disable-line
Flash('Something went wrong while fetching latest comments.');
});
}, 15000);
},
......@@ -93,7 +93,7 @@ export default {
this.$store.dispatch('toggleAward', { endpoint, awardName, noteId })
.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 = {
if (hasQuickActions && Object.keys(errors).length) {
context.dispatch('poll');
$('.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) {
......@@ -241,12 +241,12 @@ const actions = {
awardsHandler.scrollToAwards();
}).catch(() => {
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) {
new Flash(errors.commands_only, 'notice', $(noteData.flashContainer)); // eslint-disable-line
Flash(errors.commands_only, 'notice', $(noteData.flashContainer));
}
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