Skip to content

Commit d616fae

Browse files
committed
show latest version
1 parent 2aef987 commit d616fae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

versions/src/components/oap-versions/oap-versions.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@ export class Version {
5151
}
5252
}
5353

54+
this.versions.sort((l, r) => r.version.localeCompare(l.version));
55+
5456
const active = this.versions.find(i => i.active)
5557
if(active) {
5658
this.left2 = active;
5759
this.versions = this.versions.filter(i => !i.active)
60+
} else {
61+
this.left2 = this.versions.shift()
5862
}
59-
60-
this.versions.sort((l, r) => r.version.localeCompare(l.version));
6163
}
6264

6365
toggleDropdown() {

0 commit comments

Comments
 (0)