extensionUtils: Check version variable for undefined first
Avoid a warning message when trying to access requiredArray[2] by checking if its undefined first. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
This commit is contained in:
parent
d2ead59d74
commit
8754736fda
@ -165,8 +165,8 @@ function versionCheck(required, current) {
|
|||||||
let requiredArray = required[i].split('.');
|
let requiredArray = required[i].split('.');
|
||||||
if (requiredArray[0] == major &&
|
if (requiredArray[0] == major &&
|
||||||
requiredArray[1] == minor &&
|
requiredArray[1] == minor &&
|
||||||
(requiredArray[2] == point ||
|
((requiredArray[2] === undefined && parseInt(minor) % 2 == 0) ||
|
||||||
(requiredArray[2] == undefined && parseInt(minor) % 2 == 0)))
|
requiredArray[2] == point))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user