mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix for reading "options" property from backend in manage dashboard (#11701)
Co-authored-by: Monica Gupta <mogupt@microsoft.com>
This commit is contained in:
@@ -132,10 +132,11 @@ export class PropertiesWidgetComponent extends DashboardWidget implements IDashb
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private getValueOrDefault<T>(infoObject: ServerInfo | {}, propertyValue: string, defaultVal?: any): T {
|
private getValueOrDefault<T>(infoObject: ServerInfo | {}, propertyName: string, defaultVal?: any): T {
|
||||||
let val: T = undefined;
|
let val: T = undefined;
|
||||||
if (infoObject) {
|
let obj = propertyName in infoObject ? infoObject : ('options' in infoObject && propertyName in infoObject.options ? infoObject.options : undefined);
|
||||||
val = infoObject[propertyValue];
|
if (obj) {
|
||||||
|
val = obj[propertyName];
|
||||||
}
|
}
|
||||||
if (types.isUndefinedOrNull(val)) {
|
if (types.isUndefinedOrNull(val)) {
|
||||||
val = defaultVal;
|
val = defaultVal;
|
||||||
|
|||||||
Reference in New Issue
Block a user