Skip to content

Commit

Permalink
fix: Merge default configuration with original configuration in getCo…
Browse files Browse the repository at this point in the history
…nfigurationAsync
  • Loading branch information
maxisam committed Nov 1, 2024
1 parent de2d867 commit daa36a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/configUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export async function getConfigurationAsync(configDirUri: vscode.Uri): Promise<I
const configPath = vscode.Uri.joinPath(configDirUri, CONFIG_FILE_NAME);
try {
const configData = await vscode.workspace.fs.readFile(configPath);
return JSON.parse(configData.toString());
const origConfig = JSON.parse(configData.toString());
return { ...defaultConfiguration, ...origConfig };
} catch {
return defaultConfiguration;
}
Expand Down

0 comments on commit daa36a5

Please sign in to comment.