Browse Source

app settings cast to a number on save

all-modes
pbca26 8 years ago
parent
commit
2a70f3e265
  1. 4
      react/src/components/dashboard/settings/settings.js

4
react/src/components/dashboard/settings/settings.js

@ -450,10 +450,10 @@ class Settings extends React.Component {
for (let key in _appSettings) {
if (key.indexOf('__') === -1) {
_appSettingsPristine[key] = _appSettings[key];
_appSettingsPristine[key] = this.state.appConfigSchema[key].type === 'number' ? Number(_appSettings[key]) : _appSettings[key];
} else {
const _nestedKey = key.split('__');
_appSettingsPristine[_nestedKey[0]][_nestedKey[1]] = _appSettings[key];
_appSettingsPristine[_nestedKey[0]][_nestedKey[1]] = this.state.appConfigSchema[_nestedKey[0]][_nestedKey[1]].type === 'number' ? Number(_appSettings[key]) : _appSettings[key];
}
}

Loading…
Cancel
Save