mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix(Currencies): Currencies preferences.
This commit is contained in:
@@ -45,7 +45,13 @@ function CurrencyDeleteAlert({
|
||||
});
|
||||
closeAlert(name);
|
||||
})
|
||||
.catch(() => {
|
||||
.catch(({ response: { data: { errors } } }) => {
|
||||
if (errors.find(e => e.type === 'CANNOT_DELETE_BASE_CURRENCY')) {
|
||||
AppToaster.show({
|
||||
intent: Intent.DANGER,
|
||||
message: 'Cannot delete the base currency.'
|
||||
});
|
||||
}
|
||||
closeAlert(name);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user