From 6ef2e3589eb8981a8c13cb8ea97d06d04cb9b29a Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Thu, 17 Sep 2026 12:44:57 -0700 Subject: [PATCH] Skip empty room names in topic index backfill A historical rooms record with an empty room name made the backfill call put('') and abort with "key cannot be an empty String". Skip records with no room name so the one-time backfill can complete; such rooms have no listing entry to write. By specifier. --- psf-memo-db/src/lib/backfill-topic-indexes.js | 1 + 1 file changed, 1 insertion(+) diff --git a/psf-memo-db/src/lib/backfill-topic-indexes.js b/psf-memo-db/src/lib/backfill-topic-indexes.js index 9f37036..b9ba5e4 100644 --- a/psf-memo-db/src/lib/backfill-topic-indexes.js +++ b/psf-memo-db/src/lib/backfill-topic-indexes.js @@ -47,6 +47,7 @@ async function collectSummaries (roomsDb) { for await (const [key, value] of roomsDb.iterator()) { const room = roomFromEntry(key, value) + if (!room) continue if (!summaries.has(room)) { summaries.set(room, { room, postCount: 0, lastHeight: 0 }) }