Skip to content

Build your personal knowledge base with Trilium Notes

fix(left-pane): preferred width is not restored (closes #990)

Elian Doran8e3faffd357d
diff --git a/src/public/app/services/options.ts b/src/public/app/services/options.ts
index 660861d179..c20c5bfe08 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;
+ }
+ if (typeof value == "string") {
+ return parseInt(value);
}
- return parseInt(value);
+ console.warn("Attempting to read int for unsupported value: ", value);
+ return null;
}
getFloat(key: string) {