68346: Upload bitstream bugfix - properly refresh uploader component

This commit is contained in:
Kristof De Langhe
2020-04-03 11:52:09 +02:00
parent 926f8e5a2f
commit e56d3f717f
2 changed files with 2 additions and 1 deletions

View File

@@ -90,7 +90,7 @@ describe('UploadBistreamComponent', () => {
buildAuthHeader: () => authToken
});
const notificationsServiceStub = new NotificationsServiceStub();
const uploaderComponent = jasmine.createSpyObj('uploaderComponent', ['ngOnInit']);
const uploaderComponent = jasmine.createSpyObj('uploaderComponent', ['ngOnInit', 'ngAfterViewInit']);
const requestService = jasmine.createSpyObj('requestService', {
removeByHrefSubstring: {}
});

View File

@@ -154,6 +154,7 @@ export class UploadBitstreamComponent implements OnInit, OnDestroy {
// Re-initialize the uploader component to ensure the latest changes to the options are applied
if (this.uploaderComponent) {
this.uploaderComponent.ngOnInit();
this.uploaderComponent.ngAfterViewInit();
}
});
}