ui: fix version comparison

This commit is contained in:
nick-delirium 2024-10-30 14:30:41 +01:00
parent 2167d0c172
commit c36946ee9e
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 2 additions and 2 deletions

View file

@ -71,7 +71,7 @@ function SubHeader(props) {
<WarnBadge
siteId={projectId}
currentLocation={currentLocation}
version={currentSession?.trackerVersion ?? '1.0.0'}
version={currentSession?.trackerVersion ?? undefined}
/>
<SessionTabs />

View file

@ -43,7 +43,7 @@ const WarnBadge = React.memo(
currentLocation &&
defaultLocalhostWarn &&
/(localhost)|(127.0.0.1)|(0.0.0.0)/.test(currentLocation);
const trackerVersion = window.env.TRACKER_VERSION ?? '1.0.0';
const trackerVersion = window.env.TRACKER_VERSION ?? undefined;
const trackerVerDiff = compareVersions(version, trackerVersion);
const trackerWarnActive = trackerVerDiff !== VersionComparison.Same;