diff --git a/src/sql/workbench/contrib/dashboard/browser/widgets/properties/propertiesWidget.component.ts b/src/sql/workbench/contrib/dashboard/browser/widgets/properties/propertiesWidget.component.ts index 56dbab187e..cecb0c4581 100644 --- a/src/sql/workbench/contrib/dashboard/browser/widgets/properties/propertiesWidget.component.ts +++ b/src/sql/workbench/contrib/dashboard/browser/widgets/properties/propertiesWidget.component.ts @@ -132,10 +132,11 @@ export class PropertiesWidgetComponent extends DashboardWidget implements IDashb }); } - private getValueOrDefault(infoObject: ServerInfo | {}, propertyValue: string, defaultVal?: any): T { + private getValueOrDefault(infoObject: ServerInfo | {}, propertyName: string, defaultVal?: any): T { let val: T = undefined; - if (infoObject) { - val = infoObject[propertyValue]; + let obj = propertyName in infoObject ? infoObject : ('options' in infoObject && propertyName in infoObject.options ? infoObject.options : undefined); + if (obj) { + val = obj[propertyName]; } if (types.isUndefinedOrNull(val)) { val = defaultVal;