diff --git a/packages/frontend/src/preferences.ts b/packages/frontend/src/preferences.ts index 97e01ea85d..8d3cbae797 100644 --- a/packages/frontend/src/preferences.ts +++ b/packages/frontend/src/preferences.ts @@ -87,6 +87,13 @@ const storageProvider: StorageProvider = { }, cloudGets: async (ctx) => { + /* this happens when the frontend boots and there's no logged-in + user; we can't call `i/registry/get-all` because that would + fail, but also we don't need to: return the empty result that + the caller asked for */ + if (ctx.needs.length === 0) { + return {}; + } const cloudDatas = await misskeyApi('i/registry/get-all', { scope: ['client', 'preferences', 'sync'], }) as Record;