fix: tolerate callback parameter values in ParameterRow (via #4873)

* fix: tolerate callback parameter values in ParameterRow
* Update 4867.js
This commit is contained in:
kyle
2018-09-12 20:56:23 -07:00
committed by GitHub
parent e28c502a22
commit 8fb0cfd2bb
3 changed files with 47 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ export default class ParameterRow extends Component {
let { specSelectors, pathMethod, rawParam } = props
let { isOAS3 } = specSelectors
let parameterWithMeta = specSelectors.parameterWithMetaByIdentity(pathMethod, rawParam)
let parameterWithMeta = specSelectors.parameterWithMetaByIdentity(pathMethod, rawParam) || new Map()
// fallback, if the meta lookup fails
parameterWithMeta = parameterWithMeta.isEmpty() ? rawParam : parameterWithMeta
@@ -87,7 +87,7 @@ export default class ParameterRow extends Component {
let paramWithMeta = specSelectors.parameterWithMetaByIdentity(pathMethod, rawParam)
if (paramWithMeta.get("value") !== undefined) {
if (!paramWithMeta || paramWithMeta.get("value") !== undefined) {
return
}
@@ -117,6 +117,10 @@ export default class ParameterRow extends Component {
const { showExtensions, showCommonExtensions } = getConfigs()
if(!param) {
param = rawParam
}
// const onChangeWrapper = (value) => onChange(param, value)
const JsonSchemaForm = getComponent("JsonSchemaForm")
const ParamBody = getComponent("ParamBody")