Fix issue where you cannot re-enable storage after disabling it

This commit is contained in:
Gabe Kangas 2021-02-03 12:20:03 -08:00
parent 5e2c1a42b0
commit 53cf80282e

View File

@ -27,12 +27,10 @@ const { Panel } = Collapse;
function checkSaveable(formValues: any, currentValues: any) {
const { endpoint, accessKey, secret, bucket, region, enabled, servingEndpoint, acl } = formValues;
// if fields are filled out and different from what's in store, then return true
if (!enabled || enabled !== currentValues.enabled) {
return true;
}
if (enabled) {
if (!!endpoint && isValidUrl(endpoint) && !!accessKey && !!secret && !!bucket && !!region) {
if (
enabled !== currentValues.enabled ||
endpoint !== currentValues.endpoint ||
accessKey !== currentValues.accessKey ||
secret !== currentValues.secret ||