remove localstorage getconfig fallbacks (#4432)
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user