From 8e3faffd357d1524e4f305be06e9560b700587a2 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 18 Jan 2025 12:54:59 +0200 Subject: [PATCH] fix(left-pane): preferred width is not restored (closes #990) --- src/public/app/services/options.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/public/app/services/options.ts b/src/public/app/services/options.ts index 660861d17..c20c5bfe0 100644 --- a/src/public/app/services/options.ts +++ b/src/public/app/services/options.ts @@ -36,10 +36,14 @@ class Options { getInt(key: string) { const value = this.arr?.[key]; - if (typeof value !== "string") { - return null; + if (typeof value === "number") { + return value; } - return parseInt(value); + if (typeof value == "string") { + return parseInt(value); + } + console.warn("Attempting to read int for unsupported value: ", value); + return null; } getFloat(key: string) {