File tree Expand file tree Collapse file tree
frontend/web/components/modals Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ const CreateFlag = class extends Component {
336336 enabled : default_enabled ,
337337 feature_state_value : hasMultivariate
338338 ? this . props . environmentFlag . feature_state_value
339- : initial_value ,
339+ : this . cleanInputValue ( initial_value ) ,
340340 multivariate_options : this . state . identityVariations ,
341341 } ) ,
342342 projectFlag,
@@ -352,7 +352,7 @@ const CreateFlag = class extends Component {
352352 {
353353 default_enabled,
354354 description,
355- initial_value,
355+ initial_value : this . cleanInputValue ( initial_value ) ,
356356 is_archived,
357357 is_server_key_only,
358358 metadata :
@@ -440,6 +440,12 @@ const CreateFlag = class extends Component {
440440 }
441441 return { featureError, featureWarning }
442442 }
443+ cleanInputValue = ( value ) => {
444+ if ( value && typeof value === 'string' ) {
445+ return value . trim ( )
446+ }
447+ return value
448+ }
443449 drawChart = ( data ) => {
444450 return data ?. length ? (
445451 < ResponsiveContainer height = { 400 } width = '100%' className = 'mt-4' >
You can’t perform that action at this time.
0 commit comments