Skip to content

Commit

Permalink
Conform to expected ngOnChanges signature; tidy up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwoodiupui committed May 19, 2023
1 parent f466d0b commit d54754f
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import { ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, ViewChild } from '@angular/core';
import {
ChangeDetectorRef,
Component,
Input,
OnChanges,
OnDestroy,
OnInit,
SimpleChanges,
ViewChild
} from '@angular/core';

import { BehaviorSubject, Subscription } from 'rxjs';
import { filter } from 'rxjs/operators';
Expand Down Expand Up @@ -168,13 +177,13 @@ export class SubmissionSectionUploadFileComponent implements OnChanges, OnInit,
/**
* Retrieve bitstream's metadata
*/
ngOnChanges() {
ngOnChanges(changes: SimpleChanges): void {
if (this.availableAccessConditionOptions) {
// Retrieve file state
this.subscriptions.push(
this.uploadService
.getFileData(this.submissionId, this.sectionId, this.fileId).pipe(
filter((bitstream) => isNotUndefined(bitstream)))
.getFileData(this.submissionId, this.sectionId, this.fileId)
.pipe(filter((bitstream) => isNotUndefined(bitstream)))
.subscribe((bitstream) => {
this.fileData = bitstream;
}
Expand Down

0 comments on commit d54754f

Please sign in to comment.