mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
fix: This object has been frozen and should not be mutated
This commit is contained in:
parent
6da577d4ae
commit
d091c44c11
@ -48,7 +48,7 @@ const PayZenKeysFormComponent: React.FC<PayZenKeysFormProps> = ({ onValidKeys })
|
||||
* When the component loads for the first time, initialize the keys with the values fetched from the API (if any)
|
||||
*/
|
||||
useEffect(() => {
|
||||
updateSettings(payZenKeys.read());
|
||||
updateSettings(new Map(payZenKeys.read()));
|
||||
}, []);
|
||||
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ export const PayzenSettings: React.FC<PayzenSettingsProps> = ({ onEditKeys, onCu
|
||||
* For the private settings, we initialize them with the placeholder value, if the setting is set.
|
||||
*/
|
||||
useEffect(() => {
|
||||
const map = payZenKeys.read();
|
||||
const map = new Map(payZenKeys.read());
|
||||
for (const setting of payZenPrivateSettings) {
|
||||
map.set(setting, isPresent[setting].read() ? PAYZEN_HIDDEN : '');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user