Skip to content

🔨 Fix a crash if the Loki initialization is entirely skipped#7

Open
tiennou wants to merge 1 commit into
screeps:masterfrom
tiennou:fix/stray-cleanup-timer
Open

🔨 Fix a crash if the Loki initialization is entirely skipped#7
tiennou wants to merge 1 commit into
screeps:masterfrom
tiennou:fix/stray-cleanup-timer

Conversation

@tiennou
Copy link
Copy Markdown

@tiennou tiennou commented May 8, 2026

I just hit that case with the screepsmod-mongo that just completely skips over the LokiJS initialization. As this setTimeout is at the top-level, there's no way to make it not happen.

Fix the issue by moving the timer into a setup function, and only calling that if Loki gets initialized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant