From ab65d3efd8d38b4e63426247d6fe9df371163df6 Mon Sep 17 00:00:00 2001 From: Mikhail Potomin Date: Tue, 4 Feb 2020 10:35:52 +0100 Subject: [PATCH] Improve block readability --- src/scripts/import-open-api.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/scripts/import-open-api.ts b/src/scripts/import-open-api.ts index 805aac8c..348c2fc7 100644 --- a/src/scripts/import-open-api.ts +++ b/src/scripts/import-open-api.ts @@ -194,19 +194,19 @@ export const getResReqTypes = ( if (isReference(res)) { return getRef(res.$ref); - } else { - if (res.content) { - for (let contentType of Object.keys(res.content)) { - if (contentType.startsWith("application/json") || contentType.startsWith("application/octet-stream")) { - const schema = res.content[contentType].schema!; - return resolveValue(schema); - } + } + + if (res.content) { + for (let contentType of Object.keys(res.content)) { + if (contentType.startsWith("application/json") || contentType.startsWith("application/octet-stream")) { + const schema = res.content[contentType].schema!; + return resolveValue(schema); } - return "void"; - } else { - return "void"; } + return "void"; } + + return "void"; }), ).join(" | ");