From 3829dbcf418036cbf5307f874579686e4e5e97fb Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 7 Sep 2022 08:12:52 -0700 Subject: [PATCH] Fix const error (#4519) --- meshcentral.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshcentral.js b/meshcentral.js index 9f02db35..fa7f304b 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -2455,7 +2455,7 @@ function CreateMeshCentralServer(config, args) { if (serverid == null) { serverid = obj.serverId; } if (obj.peerConnectivityByNode[serverid] == null) return; // Guard against unknown serverid's var eventConnectChange = 0; - const state = obj.peerConnectivityByNode[serverid][nodeid]; + var state = obj.peerConnectivityByNode[serverid][nodeid]; if (state) { // Change the connection in the node and mesh state lists if ((state.connectivity & connectType) == 0) { state.connectivity |= connectType; eventConnectChange = 1; } @@ -2553,7 +2553,7 @@ function CreateMeshCentralServer(config, args) { // Remove the agent connection from the nodes connection list if (serverid == null) { serverid = obj.serverId; } if (obj.peerConnectivityByNode[serverid] == null) return; // Guard against unknown serverid's - const state = obj.peerConnectivityByNode[serverid][nodeid]; + var state = obj.peerConnectivityByNode[serverid][nodeid]; if (state == null) return; // If existing state exist, remove this connection