From 8d565a7ec7c252413720477bd533c6fd4f2714bb Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 8 Aug 2021 19:54:32 +0200 Subject: [PATCH] Fix build issue --- src/templates/Swagger/ResponseExample.jsx | 55 +++++++++++------------ 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/src/templates/Swagger/ResponseExample.jsx b/src/templates/Swagger/ResponseExample.jsx index 579a2cf8..1ac5a876 100644 --- a/src/templates/Swagger/ResponseExample.jsx +++ b/src/templates/Swagger/ResponseExample.jsx @@ -7,35 +7,34 @@ const ResponseExample = ({ examples }) => { const jsonExample = examples['application/json'] const plainText = examples['text/plain'] - if (typeof document !== `undefined`) { - if (jsonExample) { - return ( -
- Example -
- - {typeof jsonExample === 'boolean' ? ( - {JSON.stringify(jsonExample)} - ) : ( - - )} - -
- ) - } else if (plainText) { - return ( -
- Example - {plainText} -
- ) - } + if (jsonExample) { + return ( +
+ Example +
+ + {typeof jsonExample === 'boolean' ? ( + {JSON.stringify(jsonExample)} + ) : ( + + )} + +
+ ) + } else if (plainText) { + return ( +
+ Example + {plainText} +
+ ) } + return null }