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 {
132
132
case 'POSITIVE_NUM' :
133
133
case 'GTFS_BLOCK' :
134
134
case 'GTFS_FARE' :
135
- case 'GTFS_SERVICE' :
135
+ case 'GTFS_SERVICE' : {
136
136
// Ensure that an empty string is passed to value prop, so that on 'undo'
137
137
// the input value will revert back to a blank field.
138
138
const stringValue = typeof fieldProps . value === 'undefined'
@@ -144,11 +144,17 @@ export default class EditorInput extends Component {
144
144
< FormControl { ...fieldProps } value = { stringValue } />
145
145
</ FormGroup >
146
146
)
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
148
154
const elements = [
149
155
< FormGroup { ...formProps } key = { `${ editorField } -input` } >
150
156
{ basicLabel }
151
- < FormControl { ...fieldProps } />
157
+ < FormControl { ...fieldProps } value = { stringValue } />
152
158
</ FormGroup >
153
159
]
154
160
if ( field . name === 'agency_branding_url' || field . name === 'route_branding_url' ) {
@@ -174,6 +180,7 @@ export default class EditorInput extends Component {
174
180
)
175
181
}
176
182
return < span > { elements } </ span >
183
+ }
177
184
case 'GTFS_ZONE' :
178
185
return (
179
186
< FormGroup { ...formProps } >
You can’t perform that action at this time.
0 commit comments