From c2680a17fba75f7a79cc28508769d832f97cc480 Mon Sep 17 00:00:00 2001 From: simonchiang Date: Thu, 25 Jun 2026 12:00:53 +0800 Subject: [PATCH] fix: getBestCenter - access .data property of panel object getPanelData() returns {metadata, data}, not a plain array. Fixed to use pdata.data instead of pdata directly. --- resources/js/charts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/js/charts.js b/resources/js/charts.js index 6be3701..eaecafa 100644 --- a/resources/js/charts.js +++ b/resources/js/charts.js @@ -535,7 +535,7 @@ function WorldMap(selection) { AN: [0, -90] }; function getBestCenter() { - var data = GoAccess.getPanelData(panelName) || []; + var pdata = GoAccess.getPanelData(panelName);var data = (pdata && pdata.data) ? pdata.data : []; var bestCode = null, bestVisitors = 0; data.forEach(function(entry) { if (!entry.items) return;