File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -133,11 +133,13 @@ export default class Response extends React.Component {
133133 sampleSchema = activeMediaType . get ( "schema" , Map ( { } ) ) . toJS ( )
134134 if ( examplesForMediaType ) {
135135 const targetExamplesKey = this . getTargetExamplesKey ( )
136- mediaTypeExample = examplesForMediaType
136+ const targetExample = examplesForMediaType
137137 . get ( targetExamplesKey , Map ( { } ) )
138- . get ( "value" )
138+ const getMediaTypeExample = ( targetExample ) =>
139+ targetExample . get ( "value" )
140+ mediaTypeExample = getMediaTypeExample ( targetExample )
139141 if ( mediaTypeExample === undefined ) {
140- mediaTypeExample = examplesForMediaType . values ( ) . next ( ) . value
142+ mediaTypeExample = getMediaTypeExample ( examplesForMediaType . values ( ) . next ( ) . value )
141143 }
142144 shouldOverrideSchemaExample = true
143145 } else if ( activeMediaType . get ( "example" ) !== undefined ) {
You can’t perform that action at this time.
0 commit comments