mirror of
https://github.com/cytodev/LightDMMock.git
synced 2024-11-24 23:19:49 +01:00
Add !== undefined check on update checking
This commit is contained in:
parent
5ceeaa7297
commit
b127fd1d63
@ -504,11 +504,13 @@ window.checkForUpdate = function(currentVersion) {
|
|||||||
switch(request.status) {
|
switch(request.status) {
|
||||||
case 200:
|
case 200:
|
||||||
try {
|
try {
|
||||||
var latest = JSON.parse(request.responseText).tag_name;
|
var latest;
|
||||||
|
|
||||||
if(currentVersion !== latest) {
|
if(request.responseText !== undefined)
|
||||||
|
latest = JSON.parse(request.responseText).tag_name;
|
||||||
|
|
||||||
|
if(currentVersion !== latest)
|
||||||
window.console.warn("You are using an outdated version of LightDMMock. Please download the new version from https://github.com/CytoDev/LightDMMock/releases/" + latest);
|
window.console.warn("You are using an outdated version of LightDMMock. Please download the new version from https://github.com/CytoDev/LightDMMock/releases/" + latest);
|
||||||
}
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
window.console.error(e.toString());
|
window.console.error(e.toString());
|
||||||
window.console.warn("Could not check for new version of LightDMMock. Please check for a new version manually by visiting https://github.com/CytoDev/LightDMMock/releases/latest");
|
window.console.warn("Could not check for new version of LightDMMock. Please check for a new version manually by visiting https://github.com/CytoDev/LightDMMock/releases/latest");
|
||||||
|
Loading…
Reference in New Issue
Block a user