From b3be02c15c16ddbfcdc8ab57f12c44d18da33e0f Mon Sep 17 00:00:00 2001 From: onezDerv Date: Wed, 18 Sep 2024 06:51:29 -0400 Subject: [PATCH] squash dupes --- js/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index ae96a74..5ba3c9a 100644 --- a/js/app.js +++ b/js/app.js @@ -60,7 +60,7 @@ async function main(type) { extraFetch = await (fetch(`https://hf.zenoverse.net/studio_project/${user}`) .then(x => x.json())); extraFetch.forEach(x => { - x.studio = studios[user].title; + x.studio = studios[user ].title; }); } else if (typed == '#' && type == '#comment') { extraFetch = await (fetch(`https://hf.zenoverse.net/studio_comment/${user}`) @@ -78,6 +78,9 @@ async function main(type) { entries = [...entries, ...extraFetch]; } entries = entries.sort((a, b) => b.id - a.id); + entries = entries.filter(function({id: item}, pos, ary) { + return !pos || item != ary[pos - 1].id; + }); let params = new URL(window.location).searchParams;