diff --git a/src/core/plugins/oas3/components/request-body.jsx b/src/core/plugins/oas3/components/request-body.jsx index 30a5e247..15d3c45a 100644 --- a/src/core/plugins/oas3/components/request-body.jsx +++ b/src/core/plugins/oas3/components/request-body.jsx @@ -28,12 +28,12 @@ const RequestBody = ({ const requestBodyDescription = (requestBody && requestBody.get("description")) || null const requestBodyContent = (requestBody && requestBody.get("content")) || new OrderedMap() - contentType = contentType || requestBodyContent.keySeq().first() + contentType = contentType || requestBodyContent.keySeq().first() || "" const mediaTypeValue = requestBodyContent.get(contentType, OrderedMap()) const schemaForMediaType = mediaTypeValue.get("schema", OrderedMap()) - if(!mediaTypeValue) { + if(!mediaTypeValue.size) { return null }