hotfix bug where the version check was not functioning as expected when the version in the device status was empty or the requiredVersion was N/A

This commit is contained in:
csawatzky 2026-01-19 12:33:05 -06:00
parent 9b45474cb6
commit fa1130f777

View file

@ -182,6 +182,17 @@ export class Device {
} }
private versionComparison(deviceVersion: string, requiredVersion: string): boolean { private versionComparison(deviceVersion: string, requiredVersion: string): boolean {
// Feature explicitly not supported on this platform
if (!requiredVersion || requiredVersion === "N/A") {
return false;
}
// Device firmware missing / unset
if (!deviceVersion || deviceVersion.trim() === "") {
return false;
}
//compare the versions
const parse = (v: string) => { const parse = (v: string) => {
const [core, pre] = v.split("-"); const [core, pre] = v.split("-");
const parts = core.split(".").map(n => parseInt(n, 10)); const parts = core.split(".").map(n => parseInt(n, 10));