remove localstorage getconfig fallbacks (#4432)

This commit is contained in:
Zane
2025-09-04 09:01:27 -07:00
committed by GitHub
parent 645c0bac6f
commit 429aeffc77
2 changed files with 3 additions and 84 deletions
+3 -11
View File
@@ -124,18 +124,10 @@ const electronAPI: ElectronAPI = {
platform: process.platform,
reactReady: () => ipcRenderer.send('react-ready'),
getConfig: () => {
// Add fallback to localStorage if config from preload is empty or missing
if (!config || Object.keys(config).length === 0) {
try {
if (window.localStorage) {
const storedConfig = localStorage.getItem('gooseConfig');
if (storedConfig) {
return JSON.parse(storedConfig);
}
}
} catch (e) {
console.warn('Failed to parse stored config from localStorage:', e);
}
console.warn(
'No config provided by main process. This may indicate an initialization issue.'
);
}
return config;
},