From 7f3e9c25371291fe273ae00e9d06bcfc2f0390e8 Mon Sep 17 00:00:00 2001 From: adueck Date: Tue, 23 Apr 2024 16:56:43 +0400 Subject: [PATCH] oops --- functions/src/publish.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/functions/src/publish.ts b/functions/src/publish.ts index 7e89934..0c6c38e 100644 --- a/functions/src/publish.ts +++ b/functions/src/publish.ts @@ -133,13 +133,6 @@ async function getRawEntries(): Promise { 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 { ); 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;