[F] Avoid duplicates

pull/32/head
Hykilpikonna 2022-11-17 02:30:42 -05:00
parent 185586a137
commit a503f4e24e
No known key found for this signature in database
GPG Key ID: 256CD01A41D7FA26
1 changed files with 3 additions and 1 deletions

View File

@ -41,7 +41,9 @@ function buildPeopleInfoAndList() {
...Object.fromEntries(PEOPLE_LIST_KEYS.map(key => [key, info[key]]))
} as PeopleMeta;
peopleList.push(peopleMeta);
// Avoid duplicates
if (peopleList.filter(it => it.id == peopleMeta.id).length == 0)
peopleList.push(peopleMeta);
// Combine comments in people/${dirname}/comments/${cf}.json
const commentPath = path.join(srcPath, COMMENTS_DIR)