Bug fix, most recent post would not show in the post's permalink due to

an indexing bug, pretty simple fix, I'm just a moron.
This commit is contained in:
2025-10-02 10:47:38 +01:00
parent d9d45ff6ea
commit 179a4f83bc

View File

@@ -49,7 +49,7 @@ export function getdata(data, index=-1) {
if (data == "posts" || data == 'users' || data == 'comments') { if (data == "posts" || data == 'users' || data == 'comments') {
let result = func.require_module(`../data/${data}.json`) let result = func.require_module(`../data/${data}.json`)
if (index != -1) { if (index != -1) {
if (index < result.length-1) { if (index < result.length) {
return result[index] return result[index]
} }
else { else {