mirror of
https://github.com/Vendicated/Vencord
synced 2024-08-26 03:37:47 -04:00
Summaries: Fix start error if no summaries-data exist
This commit is contained in:
parent
41c5bbd952
commit
6b4899804a
1 changed files with 1 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue