Skip to content

Commit 19d22cb

Browse files
dklilleyGitHub Enterprise
authored andcommitted
Merge pull request mathworks#52 from development/dlilley/bugfix/use-default-configuration
Use default settings when configuration is missing fields
2 parents 5997fec + 80694ed commit 19d22cb

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/lifecycle/ConfigurationManager.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ export interface Settings {
4242

4343
type SettingName = 'installPath' | 'matlabConnectionTiming' | 'indexWorkspace' | 'telemetry' | 'maxFileSizeForAnalysis' | 'signIn'
4444

45-
46-
47-
4845
const SETTING_NAMES: SettingName[] = [
4946
'installPath',
5047
'matlabConnectionTiming',
@@ -148,10 +145,10 @@ class ConfigurationManager {
148145
this.configuration = await connection.workspace.getConfiguration('MATLAB') as Settings
149146
}
150147

151-
return this.configuration
148+
return Object.assign(this.defaultConfiguration, this.configuration)
152149
}
153150

154-
return this.globalSettings
151+
return Object.assign(this.defaultConfiguration, this.globalSettings)
155152
}
156153

157154
/**

0 commit comments

Comments
 (0)