Skip to content

Commit

Permalink
Fix #37041
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Oct 30, 2017
1 parent 997eb0e commit 7ebc204
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions extensions/json/client/src/jsonMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,14 @@ function getSchemaAssociation(context: ExtensionContext): ISchemaAssociations {

function getSettings(): Settings {
let httpSettings = workspace.getConfiguration('http');
let jsonSettings = workspace.getConfiguration('json');

let settings: Settings = {
http: {
proxy: httpSettings.get('proxy'),
proxyStrictSSL: httpSettings.get('proxyStrictSSL')
},
json: {
format: jsonSettings.get('format'),
format: workspace.getConfiguration('json').get('format'),
schemas: [],
}
};
Expand Down Expand Up @@ -244,7 +243,7 @@ function getSettings(): Settings {
};

// merge global and folder settings. Qualify all file matches with the folder path.
let globalSettings = jsonSettings.get<JSONSchemaSettings[]>('schemas');
let globalSettings = workspace.getConfiguration('json', null).get<JSONSchemaSettings[]>('schemas');
if (Array.isArray(globalSettings)) {
collectSchemaSettings(globalSettings, workspace.rootPath);
}
Expand Down

1 comment on commit 7ebc204

@sandy081
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aeschli I adopted the json code to pass null to get a resource configuration for any resource. Let me know if it is ok.

Please sign in to comment.