mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
clone value to keep from getting previous settings (#688)
This commit is contained in:
committed by
Karl Burtram
parent
f1ddea986a
commit
f5a866aa42
@@ -37,6 +37,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
|
|||||||
import Event, { Emitter } from 'vs/base/common/event';
|
import Event, { Emitter } from 'vs/base/common/event';
|
||||||
import Severity from 'vs/base/common/severity';
|
import Severity from 'vs/base/common/severity';
|
||||||
import * as nls from 'vs/nls';
|
import * as nls from 'vs/nls';
|
||||||
|
import { deepClone } from 'vs/base/common/objects';
|
||||||
|
|
||||||
const DASHBOARD_SETTINGS = 'dashboard';
|
const DASHBOARD_SETTINGS = 'dashboard';
|
||||||
|
|
||||||
@@ -251,7 +252,7 @@ export class DashboardServiceInterface implements OnDestroy {
|
|||||||
*/
|
*/
|
||||||
public getSettings<T>(type: string): T {
|
public getSettings<T>(type: string): T {
|
||||||
let config = this._configService.getValue<T>([DASHBOARD_SETTINGS, type].join('.'));
|
let config = this._configService.getValue<T>([DASHBOARD_SETTINGS, type].join('.'));
|
||||||
return config;
|
return deepClone(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
public writeSettings(key: string, value: any, target: ConfigurationTarget) {
|
public writeSettings(key: string, value: any, target: ConfigurationTarget) {
|
||||||
|
|||||||
Reference in New Issue
Block a user