mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Fix updatenotification (#3281)
Sometime, `pm2 jlist` don't send an json reponse Catch error if happen --------- Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
This commit is contained in:
committed by
GitHub
parent
e77f10b86d
commit
74854387cd
@@ -198,8 +198,14 @@ class Updater {
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
let result = JSON.parse(std);
|
||||
resolve(result);
|
||||
try {
|
||||
let result = JSON.parse(std);
|
||||
resolve(result);
|
||||
} catch (e) {
|
||||
Log.error("updatenotification: [PM2] can't GetList!");
|
||||
Log.debug("updatenotification: [PM2] GetList is not an JSON format", e);
|
||||
resolve(null);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user