mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
[bugfix] fix non-blocking js error when there is not payment gateway set
This commit is contained in:
parent
5f5af95634
commit
7b12e56521
@ -90,7 +90,9 @@ export const AbstractPaymentModal: React.FC<AbstractPaymentModalProps> = ({ isOp
|
|||||||
CustomAssetAPI.get(CustomAssetName.CgvFile).then(asset => setCgv(asset));
|
CustomAssetAPI.get(CustomAssetName.CgvFile).then(asset => setCgv(asset));
|
||||||
SettingAPI.get(SettingName.PaymentGateway).then((setting) => {
|
SettingAPI.get(SettingName.PaymentGateway).then((setting) => {
|
||||||
// we capitalize the first letter of the name
|
// we capitalize the first letter of the name
|
||||||
setGateway(setting.value.replace(/^\w/, (c) => c.toUpperCase()));
|
if (setting.value) {
|
||||||
|
setGateway(setting.value.replace(/^\w/, (c) => c.toUpperCase()));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => { mounted.current = false; };
|
return () => { mounted.current = false; };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user