From 43e97079deb993d362b8d9fe90d37158a269e4be Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 22 Jul 2021 11:42:44 -0400 Subject: [PATCH] Filter out undefined values in hotbar-store migration 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 0bf780b201..3dd635effc 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 {