squash dupes
This commit is contained in:
parent
216983f48b
commit
b3be02c15c
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue