fix 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:
parent
9f3b48c277
commit
76774b4692
1 changed files with 11 additions and 0 deletions
|
|
@ -182,6 +182,17 @@ export class Device {
|
|||
}
|
||||
|
||||
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 [core, pre] = v.split("-");
|
||||
const parts = core.split(".").map(n => parseInt(n, 10));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue