From f43724667785f605d7e6260d3d15631f055d4c00 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Wed, 19 Jan 2022 12:59:36 +0100 Subject: [PATCH] fix(normalizeSwagger): fix regression in swagger normalization Regression was introduced in 067229e. Refs https://github.com/swagger-api/swagger-ui/issues/7771 --- src/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.js b/src/helpers.js index f18a1f156..c2cdb8c79 100755 --- a/src/helpers.js +++ b/src/helpers.js @@ -143,7 +143,7 @@ export function normalizeSwagger(parsedSpec) { // eslint-disable-next-line no-restricted-syntax, guard-for-in for (const method in path) { const operation = path[method]; - if (path == null || !['object', 'function'].includes(typeof path)) { + if (operation == null || !['object', 'function'].includes(typeof operation)) { continue; // eslint-disable-line no-continue }