Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarieVerdonck committed Jul 16, 2020
1 parent 75f3946 commit f9617f0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/app/core/data/processes/script-data.service.ts
Expand Up @@ -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)
Expand Down
Expand Up @@ -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
})
)
Expand Down
3 changes: 1 addition & 2 deletions src/app/shared/menu/menu-section/menu-section.component.ts
Expand Up @@ -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
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/menu/menu.component.ts
Expand Up @@ -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}) => {
Expand Down

0 comments on commit f9617f0

Please sign in to comment.