1
0

lint fixes

This commit is contained in:
Marie Verdonck
2020-07-16 11:45:48 +02:00
parent 930512efaa
commit 9e095d09b6
5 changed files with 7 additions and 8 deletions

View File

@@ -67,8 +67,8 @@ export class MetadataImportPageComponent implements OnInit {
);
this.uploaderId = 'ds-drag-and-drop-uploader' + uniqueId();
this.isOverDocumentDropZone = observableOf(false);
window.addEventListener('drop', e => {
e && e.preventDefault();
window.addEventListener('drop', (e: DragEvent) => {
return e && e.preventDefault();
}, false);
this.uploader = new FileUploader({
// required, but using onFileDrop, not uploader

View File

@@ -21,8 +21,8 @@ import { dataService } from '../../cache/builders/build-decorators';
import { SCRIPT } from '../../../process-page/scripts/script.resource-type';
import { hasValue } from '../../../shared/empty.util';
export const METADATA_IMPORT_SCRIPT_NAME: string = 'metadata-import';
export const METADATA_EXPORT_SCRIPT_NAME: string = 'metadata-export';
export const METADATA_IMPORT_SCRIPT_NAME = 'metadata-import';
export const METADATA_EXPORT_SCRIPT_NAME = 'metadata-export';
@Injectable()
@dataService(SCRIPT)

View File

@@ -99,7 +99,7 @@ export class DSOSelectorComponent implements OnInit {
return this.searchService.search(
new PaginatedSearchOptions({
query: query,
dsoType: this.type != DSpaceObjectType.DSPACEOBJECT ? this.type : null,
dsoType: this.type !== DSpaceObjectType.DSPACEOBJECT ? this.type : null,
pagination: this.defaultPagination
})
)

View File

@@ -18,7 +18,7 @@ import { BehaviorSubject } from 'rxjs';
selector: 'ds-menu-section',
template: ''
})
export class MenuSectionComponent implements OnInit, OnDestroy{
export class MenuSectionComponent implements OnInit, OnDestroy {
/**
* Observable that emits whether or not this section is currently active
@@ -43,7 +43,6 @@ export class MenuSectionComponent implements OnInit, OnDestroy{
component: GenericConstructor<MenuSectionComponent>
}>> = new BehaviorSubject(new Map());
/**
* Array to track all subscriptions and unsubscribe them onDestroy
* @type {Array}

View File

@@ -86,7 +86,7 @@ export class MenuComponent implements OnInit, OnDestroy {
// So this switchMap is equivalent to a subscribe with a forEach inside
switchMap((sections: MenuSection[]) => sections),
switchMap((section: MenuSection) => this.getSectionComponent(section).pipe(
map((component: GenericConstructor<MenuSectionComponent>) => ({ section, component }))
map((component: GenericConstructor<MenuSectionComponent>) => ({ section, component }))
)),
distinctUntilChanged((x,y) => x.section.id === y.section.id)
).subscribe(({ section, component}) => {