1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

Merge pull request #68 from Unleash/bugfix/default-percentage-value

Bugfix: Default percentage values should be set, not just displayed.
This commit is contained in:
Ivar Conradi Østhus 2017-02-15 17:13:43 +01:00 committed by GitHub
commit 3fac119366

View File

@ -84,7 +84,7 @@ class StrategyConfigure extends React.Component {
let value = this.props.strategy.parameters[name]; let value = this.props.strategy.parameters[name];
if (type === 'percentage') { if (type === 'percentage') {
if (value == null || (typeof value === 'string' && value === '')) { if (value == null || (typeof value === 'string' && value === '')) {
value = 50; // default value this.setConfig(name, 50);
} }
return ( return (
<div key={name}> <div key={name}>