From edeab906bcff51917a655cbd65b99456b2e8bea2 Mon Sep 17 00:00:00 2001 From: Kim Santiago <31145923+kisantia@users.noreply.github.com> Date: Fri, 9 Aug 2019 14:13:48 -0700 Subject: [PATCH] fix options not getting set and aggregates not getting unchecked (#6675) --- .../src/dialogs/schemaCompareOptionsDialog.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts b/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts index 54a591e665..7a077e35e8 100644 --- a/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts +++ b/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts @@ -8,6 +8,7 @@ import * as nls from 'vscode-nls'; import * as azdata from 'azdata'; import * as vscode from 'vscode'; import { SchemaCompareMainWindow } from '../schemaCompareMainWindow'; +import { isNullOrUndefined } from 'util'; const localize = nls.loadMessageBundle(); @@ -445,10 +446,11 @@ export class SchemaCompareOptionsDialog { protected async execute() { this.SetDeploymentOptions(); this.SetObjectTypeOptions(); + this.schemaComparison.setDeploymentOptions(this.deploymentOptions); + if (this.optionsChanged) { vscode.window.showWarningMessage(SchemaCompareOptionsDialog.OptionsChangedMessage, SchemaCompareOptionsDialog.YesButtonText, SchemaCompareOptionsDialog.NoButtonText).then((result) => { if (result === SchemaCompareOptionsDialog.YesButtonText) { - this.schemaComparison.setDeploymentOptions(this.deploymentOptions); this.schemaComparison.startCompare(); } }); @@ -1107,7 +1109,7 @@ export class SchemaCompareOptionsDialog { private GetSchemaCompareIncludedObjectsUtil(label): boolean { switch (label) { case SchemaCompareOptionsDialog.Aggregates: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === azdata.SchemaObjectType.Aggregates)) ? false : true; + return !isNullOrUndefined(this.deploymentOptions.excludeObjectTypes.find(x => x === azdata.SchemaObjectType.Aggregates)) ? false : true; case SchemaCompareOptionsDialog.ApplicationRoles: return (this.deploymentOptions.excludeObjectTypes.find(x => x === azdata.SchemaObjectType.ApplicationRoles)) ? false : true; case SchemaCompareOptionsDialog.Assemblies: