Parcourir la source

fix(frontend): Trim settings data when setting to storage (#5567)

sp.wack il y a 1 an
Parent
commit
19525a487c
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      frontend/src/services/settings.ts

+ 1 - 1
frontend/src/services/settings.ts

@@ -93,7 +93,7 @@ export const saveSettings = (settings: Partial<Settings>) => {
     if (!isValid) return;
     let value = settings[key as keyof Settings];
     if (value === undefined || value === null) value = "";
-    localStorage.setItem(key, value.toString());
+    localStorage.setItem(key, value.toString().trim());
   });
   localStorage.setItem("SETTINGS_VERSION", LATEST_SETTINGS_VERSION.toString());
 };