From 6b4899804a64d7b2255d5b56fd19f8631dfc3600 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 26 May 2024 21:16:12 -0300 Subject: [PATCH] Summaries: Fix start error if no summaries-data exist --- src/plugins/seeSummaries/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/seeSummaries/index.tsx b/src/plugins/seeSummaries/index.tsx index 04a25198c..68c4f4a61 100644 --- a/src/plugins/seeSummaries/index.tsx +++ b/src/plugins/seeSummaries/index.tsx @@ -87,6 +87,7 @@ export default definePlugin({ async start() { await DataStore.update("summaries-data", summaries => { + summaries ??= {}; for (const key of Object.keys(summaries)) { for (let i = summaries[key].length - 1; i >= 0; i--) { if (summaries[key][i].time < Date.now() - 1000 * 60 * 60 * 24 * settings.store.summaryExpiryThresholdDays) {