fix strict null issues (#22430)

This commit is contained in:
Alan Ren
2023-03-23 15:19:23 -07:00
committed by GitHub
parent 00897fc513
commit 59ad572800
8 changed files with 56 additions and 53 deletions

View File

@@ -53,7 +53,7 @@ export class UserDialog extends ObjectManagementDialogBase<ObjectManagement.User
if (this.objectInfo.password !== this.confirmPasswordInput.value) {
errors.push(localizedConstants.PasswordsNotMatchError);
}
if (!isValidSQLPassword(this.objectInfo.password, this.objectInfo.name)
if (!isValidSQLPassword(this.objectInfo.password!, this.objectInfo.name)
&& (this.isNewObject || this.objectInfo.password !== this.originalObjectInfo.password)) {
errors.push(localizedConstants.InvalidPasswordError);
}
@@ -96,12 +96,12 @@ export class UserDialog extends ObjectManagementDialogBase<ObjectManagement.User
width: DefaultInputWidth
}).component();
this.disposables.push(this.nameInput.onTextChanged(async () => {
this.objectInfo.name = this.nameInput.value;
this.objectInfo.name = this.nameInput.value!;
this.onObjectValueChange();
await this.runValidation(false);
}));
const nameContainer = this.createLabelInputContainer(localizedConstants.NameText, this.nameInput);
this.defaultSchemaDropdown = this.createDropdown(localizedConstants.DefaultSchemaText, this.viewInfo.schemas, this.objectInfo.defaultSchema);
this.defaultSchemaDropdown = this.createDropdown(localizedConstants.DefaultSchemaText, this.viewInfo.schemas, this.objectInfo.defaultSchema!);
this.defaultSchemaContainer = this.createLabelInputContainer(localizedConstants.DefaultSchemaText, this.defaultSchemaDropdown);
this.disposables.push(this.defaultSchemaDropdown.onValueChanged(() => {
this.objectInfo.defaultSchema = <string>this.defaultSchemaDropdown.value;