Fix const error (#4519)

Ylian Saint-Hilaire committed Sep 7, 2022 at 08:12 UTC 3829dbcf418036cbf5307f874579686e4e5e97fb
1 file changed +2 -2
meshcentral.js
+2 -2
@@ -2455,7 +2455,7 @@ function CreateMeshCentralServer(config, args) {
2455 if (serverid == null) { serverid = obj.serverId; }
2456 if (obj.peerConnectivityByNode[serverid] == null) return; // Guard against unknown serverid's
2457 var eventConnectChange = 0;
2458 - const state = obj.peerConnectivityByNode[serverid][nodeid];
2458 + var state = obj.peerConnectivityByNode[serverid][nodeid];
2459 if (state) {
2460 // Change the connection in the node and mesh state lists
2461 if ((state.connectivity & connectType) == 0) { state.connectivity |= connectType; eventConnectChange = 1; }
@@ -2553,7 +2553,7 @@ function CreateMeshCentralServer(config, args) {
2553 // Remove the agent connection from the nodes connection list
2554 if (serverid == null) { serverid = obj.serverId; }
2555 if (obj.peerConnectivityByNode[serverid] == null) return; // Guard against unknown serverid's
2556 - const state = obj.peerConnectivityByNode[serverid][nodeid];
2556 + var state = obj.peerConnectivityByNode[serverid][nodeid];
2557 if (state == null) return;
2558
2559 // If existing state exist, remove this connection