This commit is contained in:
adueck 2024-04-23 16:56:43 +04:00
parent 2db956d5a7
commit 7f3e9c2537
1 changed files with 7 additions and 7 deletions

View File

@ -133,13 +133,6 @@ async function getRawEntries(): Promise<T.DictionaryEntry[]> {
duplicates.add(row.ts);
// }
}
if (duplicates.size) {
throw new Error(
`ts ${Array.from(duplicates).join(
", "
)} is a duplicate ts of a different entry`
);
}
const e: T.DictionaryEntry = {
i: 1,
ts: parseInt(row.ts),
@ -163,6 +156,13 @@ async function getRawEntries(): Promise<T.DictionaryEntry[]> {
);
entries.push(standardizeEntry(e));
}
if (duplicates.size) {
throw new Error(
`ts ${Array.from(duplicates).join(
", "
)} is a duplicate ts of a different entry`
);
}
// add alphabetical index
entries.sort((a, b) => a.p.localeCompare(b.p, "ps"));
const entriesLength = entries.length;