diff --git a/src/sql/workbench/services/connection/browser/connectionWidget.ts b/src/sql/workbench/services/connection/browser/connectionWidget.ts index c2e183512f..4cdaa48be7 100644 --- a/src/sql/workbench/services/connection/browser/connectionWidget.ts +++ b/src/sql/workbench/services/connection/browser/connectionWidget.ts @@ -309,7 +309,7 @@ export class ConnectionWidget extends lifecycle.Disposable { */ protected registerOnSelectionChangeEvents(): void { //Register on selection change event for custom options - this._customOptionWidgets.forEach((widget, i) => { + this._customOptionWidgets?.forEach((widget, i) => { if (widget instanceof SelectBox) { this._registerSelectionChangeEvents([this._customOptionWidgets], this._customOptions[i], widget); }