1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-23 19:53:47 +00:00

Fixed exception that could occur in windows self update

This commit is contained in:
Bryan Roe
2020-11-10 03:30:31 -08:00
parent c14f8111c3
commit 337e243dfb
2 changed files with 8 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@@ -626,14 +626,15 @@ function sys_update(isservice, b64)
if (isservice)
{
var parm = b64 != null ? JSON.parse(Buffer.from(b64, 'base64').toString()) : null;
if (parm != null)
{
console.info1('sys_update(' + isservice + ', ' + JSON.stringify(parm) + ')');
if ((px = parm.getParameterIndex('fakeUpdate')) >= 0)
{
console.info1('Removing "fakeUpdate" parameter');
parm.splice(px, 1);
}
}
//
// Service Mode