Skip to content

Commit

Permalink
fix(servers): compensate when server list contains a null value
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n committed Sep 20, 2021
1 parent 4414cc9 commit a9775a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/plugins/oas3/components/servers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export default class Servers extends React.Component {
return
}

//fire 'change' event to set default 'value' of select
this.setServer(servers.first().get("url"))
// fire 'change' event to set default 'value' of select
this.setServer(servers.first()?.get("url"))
}

UNSAFE_componentWillReceiveProps(nextProps) {
Expand Down Expand Up @@ -95,7 +95,7 @@ export default class Servers extends React.Component {
} = this.props


let currentServerDefinition = servers.find(v => v.get("url") === currentServer) || OrderedMap()
let currentServerDefinition = servers.find(s => s.get("url") === currentServer) || OrderedMap()

let currentServerVariableDefs = currentServerDefinition.get("variables") || OrderedMap()

Expand Down

0 comments on commit a9775a2

Please sign in to comment.