From b44762ba7cf6583fd7b47fe1b6625bdcec1f550d Mon Sep 17 00:00:00 2001 From: deadvey Date: Wed, 24 Sep 2025 20:18:05 +0100 Subject: [PATCH] bug fix Hitcount updates visually, previously it just showed 1 on the frontend as the value wasn't actually being retrieved from the data.getdata() Signed-off-by: deadvey --- data/data.json | 2 +- src/data.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/data.json b/data/data.json index 1e2509f..a05db39 100644 --- a/data/data.json +++ b/data/data.json @@ -1 +1 @@ -{"hitcount":40} \ No newline at end of file +{"hitcount":45} \ No newline at end of file diff --git a/src/data.js b/src/data.js index 770ad2e..bd8b03e 100644 --- a/src/data.js +++ b/src/data.js @@ -14,9 +14,9 @@ export function getdata(data, index=-1) { } return result } - else if (data == "other_data") { + else if (data == "hitcount") { let result = require('../data/data.json') // This file is actually called data.json - return result + return result["hitcount"] } else { console.log("Error, invalid requested")