Skip to content

Commit 1f11b3e

Browse files
authored
Merge branch 'master' into bug/3658-add-enzyme-test-for-objectmodel
2 parents 1aabdde + 362f139 commit 1f11b3e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/core/components/model.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import React, { Component } from "react"
1+
import React, { PureComponent } from "react"
22
import 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

0 commit comments

Comments
 (0)