From 5f6ce17071ec49756039dd4a802265956b19a4d6 Mon Sep 17 00:00:00 2001 From: Miodec Date: Sun, 20 Mar 2022 00:05:34 +0100 Subject: [PATCH] returning if snapshot doesnt exist --- frontend/src/scripts/elements/commandline-lists.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/scripts/elements/commandline-lists.ts b/frontend/src/scripts/elements/commandline-lists.ts index 0c6fd0d65..65abb5687 100644 --- a/frontend/src/scripts/elements/commandline-lists.ts +++ b/frontend/src/scripts/elements/commandline-lists.ts @@ -1264,6 +1264,10 @@ export function updateCustomThemeListCommands(): void { customThemeListCommands.list = []; + const snapshot = DB.getSnapshot(); + + if (!snapshot) return; + if (DB.getSnapshot().customThemes.length < 0) { Notifications.add("You need to create a custom theme first", 0); return;