From 5fdaf1a656e5d2eede0c44542e75cadf70f9d4ba Mon Sep 17 00:00:00 2001 From: Nick Krecklow Date: Mon, 30 Mar 2020 00:39:38 -0500 Subject: [PATCH] fix var overlap --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 868bcca..fffaf94 100644 --- a/app.js +++ b/app.js @@ -317,11 +317,11 @@ if (config.logToDatabase) { if (networkData) { var graphPeakIndex = -1; var graphPeakPlayerCount = 0; - for (var i = 0; i < networkData.length; i++) { + for (var x = 0; x < networkData.length; x++) { // [1] refers to the online player count var point = networkData[i][1]; if (point > 0 && (graphPeakIndex === -1 || point > graphPeakPlayerCount)) { - graphPeakIndex = i; + graphPeakIndex = x; graphPeakPlayerCount = point; } }