Skip to content

Commit

Permalink
fix: correct the Bee version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandlor committed Dec 21, 2023
1 parent a9d11c6 commit 71d6989
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/providers/Bee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,17 @@ function getStatus(
error: Error | null,
isDesktop: boolean,
startedAt: number,
latestPublishedVersion: string | undefined,
latestUserVersion: string | undefined,
): Status {
const status: Status = { ...initialValues.status }

// Version check
status.version.isEnabled = !isDesktop
status.version.checkState =
debugApiHealth &&
semver.satisfies(debugApiHealth.version, PackageJson.engines.bee, {
latestPublishedVersion &&
latestUserVersion &&
semver.satisfies(latestPublishedVersion, latestUserVersion, {
includePrerelease: true,
})
? CheckState.OK
Expand Down Expand Up @@ -435,6 +438,8 @@ export function Provider({ children, isDesktop }: Props): ReactElement {
error,
Boolean(isDesktop),
startedAt,
latestPublishedVersion,
latestUserVersion,
)

useEffect(() => {
Expand Down

0 comments on commit 71d6989

Please sign in to comment.