diff --git a/src/core/plugins/oas3/components/http-auth.jsx b/src/core/plugins/oas3/components/http-auth.jsx index af7dda84..5df10ddf 100644 --- a/src/core/plugins/oas3/components/http-auth.jsx +++ b/src/core/plugins/oas3/components/http-auth.jsx @@ -33,12 +33,10 @@ export default class HttpAuth extends React.Component { let { onChange } = this.props let { value, name } = e.target - let newValue = this.state.value || {} + let newValue = Object.assign({}, this.state.value) + if(name) { newValue[name] = value - if(newValue.set) { - newValue = newValue.set(name, value) - } } else { newValue = value }