diff --git a/src/core/plugins/oas3/components/servers.jsx b/src/core/plugins/oas3/components/servers.jsx index 3cbe30ed681..0a181d24345 100644 --- a/src/core/plugins/oas3/components/servers.jsx +++ b/src/core/plugins/oas3/components/servers.jsx @@ -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) { @@ -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()