From 0199b4785fb565f00dde1a674143ae309629f98b Mon Sep 17 00:00:00 2001 From: geraldglynn Date: Thu, 10 Sep 2020 02:46:24 +0100 Subject: [PATCH] fix: Add `entrySeq()` to `bodyProperties.map()` (#6267) * Added immutable guard to bodyProperties --- src/core/plugins/oas3/components/request-body.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/plugins/oas3/components/request-body.jsx b/src/core/plugins/oas3/components/request-body.jsx index 05aa3dd0..4d1648d6 100644 --- a/src/core/plugins/oas3/components/request-body.jsx +++ b/src/core/plugins/oas3/components/request-body.jsx @@ -134,7 +134,7 @@ const RequestBody = ({ { - bodyProperties.map((prop, key) => { + Map.isMap(bodyProperties) && bodyProperties.entrySeq().map(([key, prop]) => { let commonExt = showCommonExtensions ? getCommonExtensions(prop) : null const required = schemaForMediaType.get("required", List()).includes(key) const type = prop.get("type") -- GitLab