File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ export default class EditorInput extends Component {
132132 case 'POSITIVE_NUM' :
133133 case 'GTFS_BLOCK' :
134134 case 'GTFS_FARE' :
135- case 'GTFS_SERVICE' :
135+ case 'GTFS_SERVICE' : {
136136 // Ensure that an empty string is passed to value prop, so that on 'undo'
137137 // the input value will revert back to a blank field.
138138 const stringValue = typeof fieldProps . value === 'undefined'
@@ -144,11 +144,17 @@ export default class EditorInput extends Component {
144144 < FormControl { ...fieldProps } value = { stringValue } />
145145 </ FormGroup >
146146 )
147- case 'URL' :
147+ }
148+ case 'URL' : {
149+ // Ensure that an empty string is passed to value prop, so that on 'undo'
150+ // the input value will revert back to a blank field.
151+ const stringValue = typeof fieldProps . value === 'undefined'
152+ ? ''
153+ : fieldProps . value
148154 const elements = [
149155 < FormGroup { ...formProps } key = { `${ editorField } -input` } >
150156 { basicLabel }
151- < FormControl { ...fieldProps } />
157+ < FormControl { ...fieldProps } value = { stringValue } />
152158 </ FormGroup >
153159 ]
154160 if ( field . name === 'agency_branding_url' || field . name === 'route_branding_url' ) {
@@ -174,6 +180,7 @@ export default class EditorInput extends Component {
174180 )
175181 }
176182 return < span > { elements } </ span >
183+ }
177184 case 'GTFS_ZONE' :
178185 return (
179186 < FormGroup { ...formProps } >
You can’t perform that action at this time.
0 commit comments