Skip to content

Commit 3e047ea

Browse files
authored
chore: fix version tag in UI (#4689)
1 parent a5350be commit 3e047ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ui/lib/utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,14 @@ export function getAppVersion(
204204
): AppVersion {
205205
const shouldDisplayApiVersion =
206206
!isLoading &&
207-
(versionData?.semver || "").replace(/^v+/, "") !== defaultVersion &&
207+
(versionData?.semver || "").replace(/^v+/, "") !==
208+
defaultVersion.replace(/^v+/, "") &&
208209
versionData?.branch &&
209210
versionData?.commit;
210211

211212
const versionText = shouldDisplayApiVersion
212213
? `${versionData.branch}-${versionData.commit}`
213-
: `${defaultVersionPrefix}${defaultVersion}`;
214+
: `${defaultVersionPrefix}${defaultVersion.replace(/^v+/, "")}`;
214215
const versionHref = shouldDisplayApiVersion
215216
? `${repoUrl}/commit/${versionData.commit}`
216217
: `${repoUrl}/releases/tag/v${defaultVersion}`;

0 commit comments

Comments
 (0)