Skip to content

Commit 0ea213e

Browse files
authored
Merge pull request #65 from kaleido-io/master
Set default selection to first server with allowServerSelection
2 parents 0ff9b2f + 287f686 commit 0ea213e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/rapidoc.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ export default class RapiDoc extends LitElement {
780780

781781
afterSpecParsedAndValidated(spec) {
782782
this.resolvedSpec = spec;
783-
if (this.allowServerSelection === 'false') {
783+
if (!this.selectedServer) {
784784
if (this.serverUrl) {
785785
this.selectedServer = this.serverUrl;
786786
} else if (this.resolvedSpec && this.resolvedSpec.servers && this.resolvedSpec.servers.length > 0) {
@@ -791,9 +791,6 @@ export default class RapiDoc extends LitElement {
791791
this.apiListStyle = 'group-by-tag';
792792
}
793793
this.requestUpdate();
794-
window.setTimeout(() => {
795-
this.onApiServerChange();
796-
}, 0);
797794
}
798795

799796
onIntersect(entries) {

0 commit comments

Comments
 (0)