diff --git a/src-gui/src/utils/multiAddrUtils.ts b/src-gui/src/utils/multiAddrUtils.ts index 3a70c9b820..76811ccded 100644 --- a/src-gui/src/utils/multiAddrUtils.ts +++ b/src-gui/src/utils/multiAddrUtils.ts @@ -17,8 +17,8 @@ export function isMakerOnCorrectNetwork( } /** Check whether a maker version is old and might not support newer features. */ -export function isMakerVersionOld(version: string | undefined): boolean { - if (version === undefined) return false; +export function isMakerVersionOld(version: string | null | undefined): boolean { + if (version == null) return false; // This checks if the version is less than the minimum version // we use .compare(...) instead of .satisfies(...) because satisfies(...) // does not work with pre-release versions @@ -26,16 +26,16 @@ export function isMakerVersionOld(version: string | undefined): boolean { } /** Check whether a maker version is too old and is known to be completely incompatile. */ -export function isMakerVersionTooOld(version: string | undefined): boolean { - if (version === undefined) return false; +export function isMakerVersionTooOld(version: string | null | undefined): boolean { + if (version == null) return false; return semver.compare(version, VERSION_FLOOR_HARD) === -1; } /** Check whether a maker is running at or above the GUI's bundled version. */ export function isMakerVersionLatest( - version: string | undefined, - guiVersion: string | undefined, + version: string | null | undefined, + guiVersion: string | null | undefined, ): boolean { - if (version === undefined || guiVersion === undefined) return false; + if (version == null || guiVersion == null) return false; return semver.compare(version, guiVersion) >= 0; }