Migrate goAway to hide

parent 39b9d1c9
......@@ -145,7 +145,7 @@ export default class FileTemplateMediator {
text: __('Undo'),
onClick: (e, toastObj) => {
self.restoreFromCache();
toastObj.goAway(0);
toastObj.hide();
},
},
});
......
......@@ -82,7 +82,7 @@ export default {
text: this.alertContent.actionText,
onClick: (_, toastObject) => {
this[this.alertContent.actionName]();
toastObject.goAway(0);
toastObject.hide();
},
},
};
......
......@@ -44,12 +44,12 @@ export default {
const { targetBranch } = this;
return this.fetchRules({ targetBranch, resetToDefault: true }).then(() => {
const toast = showToast(__('Approval rules reset to project defaults'), {
showToast(__('Approval rules reset to project defaults'), {
action: {
text: __('Undo'),
onClick: () => {
onClick: (_, toast) => {
this.undoRulesChange();
toast.goAway(0);
toast.hide();
},
},
});
......
......@@ -243,7 +243,7 @@ export const dismissVulnerability = (
dispatch('revertDismissVulnerability', { vulnerability })
.then(() => dispatch('fetchVulnerabilities', { page }))
.catch(() => {});
toastObject.goAway(0);
toastObject.hide();
}
},
},
......
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