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.
This commit is contained in:
2026-06-25 12:00:53 +08:00
parent 7436bf6e2e
commit c2680a17fb
+1 -1
View File
@@ -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;