mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 18:44:14 +00:00
ESLint: fix no-extra-boolean-cast violations
This commit is contained in:
@@ -17,7 +17,7 @@ export class ValidateEmailNotTaken {
|
||||
.pipe(
|
||||
getFirstSucceededRemoteData(),
|
||||
map(res => {
|
||||
return !!res.payload ? { emailTaken: true } : null;
|
||||
return res.payload ? { emailTaken: true } : null;
|
||||
})
|
||||
);
|
||||
};
|
||||
|
@@ -207,7 +207,7 @@ export class GroupFormComponent implements OnInit, OnDestroy {
|
||||
];
|
||||
this.formGroup = this.formBuilderService.createFormGroup(this.formModel);
|
||||
|
||||
if (!!this.formGroup.controls.groupName) {
|
||||
if (this.formGroup.controls.groupName) {
|
||||
this.formGroup.controls.groupName.setAsyncValidators(ValidateGroupExists.createValidator(this.groupDataService));
|
||||
this.groupNameValueChangeSubscribe = this.groupName.valueChanges.pipe(debounceTime(300)).subscribe(() => {
|
||||
this.changeDetectorRef.detectChanges();
|
||||
|
@@ -51,7 +51,7 @@ export class FeedbackFormComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
|
||||
this.authService.getAuthenticatedUserFromStore().pipe(take(1)).subscribe((user: EPerson) => {
|
||||
if (!!user) {
|
||||
if (user) {
|
||||
this.feedbackForm.patchValue({ email: user.email });
|
||||
}
|
||||
});
|
||||
|
@@ -170,7 +170,7 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (!!this.currentItemIsLeftItem$) {
|
||||
if (this.currentItemIsLeftItem$) {
|
||||
this.currentItemIsLeftItem$.subscribe((isLeft) => {
|
||||
this.isLeft = isLeft;
|
||||
});
|
||||
|
@@ -123,7 +123,7 @@ export class FormComponent implements OnDestroy, OnInit {
|
||||
}*/
|
||||
|
||||
private getFormGroup(): UntypedFormGroup {
|
||||
if (!!this.parentFormModel) {
|
||||
if (this.parentFormModel) {
|
||||
return this.formGroup.parent as UntypedFormGroup;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ export class FormComponent implements OnDestroy, OnInit {
|
||||
const { fieldId } = error;
|
||||
const { fieldIndex } = error;
|
||||
let field: AbstractControl;
|
||||
if (!!this.parentFormModel) {
|
||||
if (this.parentFormModel) {
|
||||
field = this.formBuilderService.getFormControlById(fieldId, formGroup.parent as UntypedFormGroup, formModel, fieldIndex);
|
||||
} else {
|
||||
field = this.formBuilderService.getFormControlById(fieldId, formGroup, formModel, fieldIndex);
|
||||
@@ -206,7 +206,7 @@ export class FormComponent implements OnDestroy, OnInit {
|
||||
const { fieldId } = error;
|
||||
const { fieldIndex } = error;
|
||||
let field: AbstractControl;
|
||||
if (!!this.parentFormModel) {
|
||||
if (this.parentFormModel) {
|
||||
field = this.formBuilderService.getFormControlById(fieldId, formGroup.parent as UntypedFormGroup, formModel, fieldIndex);
|
||||
} else {
|
||||
field = this.formBuilderService.getFormControlById(fieldId, formGroup, formModel, fieldIndex);
|
||||
|
@@ -49,7 +49,7 @@ export class BrowseEntryListElementComponent extends AbstractListableElementComp
|
||||
map((currentPage) => {
|
||||
return {
|
||||
value: this.object.value,
|
||||
authority: !!this.object.authority ? this.object.authority : undefined,
|
||||
authority: this.object.authority ? this.object.authority : undefined,
|
||||
startsWith: undefined,
|
||||
[pageParamName]: null,
|
||||
[BBM_PAGINATION_ID + '.return']: currentPage
|
||||
|
@@ -188,7 +188,7 @@ export class SubmissionSectionCcLicensesComponent extends SectionModelComponent
|
||||
*/
|
||||
getCcLicenseLink$(): Observable<string> {
|
||||
|
||||
if (!!this.storedCcLicenseLink) {
|
||||
if (this.storedCcLicenseLink) {
|
||||
return observableOf(this.storedCcLicenseLink);
|
||||
}
|
||||
if (!this.getSelectedCcLicense() || this.getSelectedCcLicense().fields.some(
|
||||
@@ -257,7 +257,7 @@ export class SubmissionSectionCcLicensesComponent extends SectionModelComponent
|
||||
).subscribe((link) => {
|
||||
this.operationsBuilder.add(path, link.toString(), false, true);
|
||||
});
|
||||
} else if (!!this.data.uri) {
|
||||
} else if (this.data.uri) {
|
||||
this.operationsBuilder.remove(path);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user