File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- import React , { Component } from "react"
1+ import React , { PureComponent } from "react"
22import PropTypes from "prop-types"
33
4- export default class Model extends Component {
4+ export default class Model extends PureComponent {
55 static propTypes = {
66 schema : PropTypes . object . isRequired ,
77 getComponent : PropTypes . func . isRequired ,
@@ -35,7 +35,7 @@ export default class Model extends Component {
3535 const PrimitiveModel = getComponent ( "PrimitiveModel" )
3636 let type = "object"
3737 let $$ref = schema && schema . get ( "$$ref" )
38-
38+
3939 // If we weren't passed a `name` but have a ref, grab the name from the ref
4040 if ( ! name && $$ref ) {
4141 name = this . getModelName ( $$ref )
@@ -44,11 +44,11 @@ export default class Model extends Component {
4444 if ( ! schema && $$ref ) {
4545 schema = this . getRefSchema ( name )
4646 }
47-
47+
4848 const deprecated = specSelectors . isOAS3 ( ) && schema . get ( "deprecated" )
4949 isRef = isRef !== undefined ? isRef : ! ! $$ref
5050 type = schema && schema . get ( "type" ) || type
51-
51+
5252 switch ( type ) {
5353 case "object" :
5454 return < ObjectModel
You can’t perform that action at this time.
0 commit comments