Skip to content

Commit

Permalink
Fix vere runtime being misreported as behind
Browse files Browse the repository at this point in the history
  • Loading branch information
patosullivan committed Sep 26, 2023
1 parent 3a645be commit d812815
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ui/src/state/vere.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ const fetchRuntimeVersion = () => {
useVereState.setState((state) => {
if (typeof data === 'object' && data !== null) {
const vereData = data as Vere;
const vereVersion = vereData.cur.rev.split('/vere/~.')[1];
const isLatest = vereData.next === undefined;
const vereVersion = vereData.cur.rev.split('/vere/live/~.')[1];
const latestVereVersion =
vereData.next !== undefined
? vereData.next.rev.split('/vere/~.')[1]
? vereData.next.rev.split('/vere/live/~.')[1]
: vereVersion;
const isLatest =
vereVersion === latestVereVersion || vereData.next === undefined;

return Object.assign(vereData, {
loaded: true,
isLatest,
Expand Down

0 comments on commit d812815

Please sign in to comment.