returning if snapshot doesnt exist

This commit is contained in:
Miodec 2022-03-20 00:05:34 +01:00
parent 3e3e82886a
commit 5f6ce17071

View file

@ -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;