fixed the config fetching for windows (#2538)
This commit is contained in:
@@ -311,11 +311,10 @@ const createChat = async (
|
|||||||
if (existingWindows.length > 0) {
|
if (existingWindows.length > 0) {
|
||||||
// Get the config from localStorage through an existing window
|
// Get the config from localStorage through an existing window
|
||||||
try {
|
try {
|
||||||
const result = await existingWindows[0].webContents.executeJavaScript(
|
const config = await existingWindows[0].webContents.executeJavaScript(
|
||||||
`localStorage.getItem('gooseConfig')`
|
`window.electron.getConfig()`
|
||||||
);
|
);
|
||||||
if (result) {
|
if (config) {
|
||||||
const config = JSON.parse(result);
|
|
||||||
port = config.GOOSE_PORT;
|
port = config.GOOSE_PORT;
|
||||||
working_dir = config.GOOSE_WORKING_DIR;
|
working_dir = config.GOOSE_WORKING_DIR;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user