Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SkillfulElectro authored Jun 5, 2024
1 parent 104be0b commit 133866e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ function loadConfig(configPath) {
try {
const configContents = fs.readFileSync(configPath, 'utf8');
const configOptions = JSON.parse(configContents);
// Merge default options with the ones from the config file

Object.assign(options, configOptions);
} catch (error) {
console.error('Error loading config file:', error);
}finally {

        fs.closeSync(fs.openSync(configPath, 'r'));
}
}

Expand Down Expand Up @@ -206,4 +209,4 @@ app.on('window-all-closed', () => {
}else{
session.defaultSession.clearStorageData()
}
});
});

0 comments on commit 133866e

Please sign in to comment.