From 0204eef848fc6d510ad532e1eec5e6fdc41266e2 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 22 Jul 2021 14:13:32 -0400 Subject: [PATCH] Filter out undefined values in hotbar-store migration (#3489) Signed-off-by: Sebastian Malton --- src/migrations/hotbar-store/5.0.0-beta.10.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migrations/hotbar-store/5.0.0-beta.10.ts b/src/migrations/hotbar-store/5.0.0-beta.10.ts index 0bf780b2019d..3dd635effc34 100644 --- a/src/migrations/hotbar-store/5.0.0-beta.10.ts +++ b/src/migrations/hotbar-store/5.0.0-beta.10.ts @@ -40,7 +40,7 @@ interface Pre500WorkspaceStoreModel { export default { version: "5.0.0-beta.10", run(store) { - const hotbars: Hotbar[] = store.get("hotbars"); + const hotbars = (store.get("hotbars") as Hotbar[] ?? []).filter(Boolean); const userDataPath = app.getPath("userData"); try {