From a0723e261a46b2b15b814fa9a585b3bba5449f97 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sun, 15 Mar 2026 14:29:13 -0700 Subject: [PATCH] fix(rbooks): use imported randomUUID() instead of crypto.randomUUID() crypto.randomUUID() crashes in the server context during demo space initialization, causing 502 Bad Gateway on /rbooks. Co-Authored-By: Claude Opus 4.6 --- modules/rbooks/mod.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rbooks/mod.ts b/modules/rbooks/mod.ts index 0e4cdfb..9623333 100644 --- a/modules/rbooks/mod.ts +++ b/modules/rbooks/mod.ts @@ -407,7 +407,7 @@ function seedTemplateBooks(space: string) { _syncServer.changeDoc(docId, 'seed template books', (d) => { for (const b of books) { - const id = crypto.randomUUID(); + const id = randomUUID(); const slug = b.title.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, ''); d.items[id] = { id, slug, title: b.title, author: b.author, description: b.desc,