From 70933dd3d7bdc3194b8bcd4d359e0e1b18be90a2 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 10 Feb 2020 14:16:19 -0800 Subject: [PATCH] Fixed amtscanner.js crash when MPS server is not present. --- amtscanner.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/amtscanner.js b/amtscanner.js index 81ac3a67..042a9bd0 100644 --- a/amtscanner.js +++ b/amtscanner.js @@ -166,7 +166,7 @@ module.exports.CreateAmtScanner = function (parent) { if (err == null && docs.length > 0) { for (var i in docs) { var doc = docs[i], host = doc.host.toLowerCase(); - const ciraConnection = obj.parent.mpsserver.ciraConnections[doc._id]; + const ciraConnection = obj.parent.mpsserver ? obj.parent.mpsserver.ciraConnections[doc._id] : null; if ((host != '127.0.0.1') && (host != '::1') && (host.toLowerCase() != 'localhost') && (ciraConnection == null)) { var scaninfo = obj.scanTable[doc._id]; if (scaninfo == undefined) { diff --git a/package.json b/package.json index 48aa5c0d..58bcfc98 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.4.8-v", + "version": "0.4.8-x", "keywords": [ "Remote Management", "Intel AMT",