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 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-15 14:29:13 -07:00
parent fdf2a429f5
commit a0723e261a
1 changed files with 1 additions and 1 deletions

View File

@ -407,7 +407,7 @@ function seedTemplateBooks(space: string) {
_syncServer.changeDoc<BooksCatalogDoc>(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,