fix: treat empty valued env variables as false | FE (#18428)

* converting empty env values to boolean before storing in store

* triming and checking empty values

* Empty commit for test

Co-authored-by: Anubhav <anubhav@appsmith.com>
This commit is contained in:
Ankit Srivastava 2022-12-13 15:38:37 +05:30 committed by GitHub
parent c5ae0521ec
commit 236214f182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,14 @@ export function* FetchAdminSettingsSaga() {
cloudHosting,
),
};
// Converting empty values to boolean false
Object.keys(settings).forEach((key) => {
if ((settings[key] as string).trim() === "") {
settings[key] = false;
}
});
yield put({
type: ReduxActionTypes.FETCH_ADMIN_SETTINGS_SUCCESS,
payload: settings,