1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-29 01:15:48 +02:00

Bugfix: Default percentage values should be set, not just displayed.

This commit is contained in:
ivaosthu 2017-02-15 17:04:27 +01:00
parent 8f605649bb
commit 07d6b85b12

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}>