mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-23 00:56:33 +03:00
parent
63ae2e8e94
commit
209c6caca0
|
@ -21,9 +21,10 @@ export class MediaTypeSamples extends React.Component<PayloadSamplesProps> {
|
|||
const sampleView = isJsonLike(mimeType)
|
||||
? sample => <JsonViewer data={sample} />
|
||||
: sample =>
|
||||
(sample && <SourceCodeWithCopy lang={langFromMime(mimeType)} source={sample} />) || {
|
||||
noSample,
|
||||
};
|
||||
(sample !== undefined && (
|
||||
<SourceCodeWithCopy lang={langFromMime(mimeType)} source={sample} />
|
||||
)) ||
|
||||
noSample;
|
||||
|
||||
const examplesNames = Object.keys(examples);
|
||||
if (examplesNames.length === 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user