diff --git a/src/app/components/results-menu/scenes-list/scenes-list.component.ts b/src/app/components/results-menu/scenes-list/scenes-list.component.ts index 5d65c0665..0c5d6073e 100644 --- a/src/app/components/results-menu/scenes-list/scenes-list.component.ts +++ b/src/app/components/results-menu/scenes-list/scenes-list.component.ts @@ -142,8 +142,8 @@ export class ScenesListComponent implements OnInit, OnDestroy, AfterContentInit scenes => { this.scenes = scenes; - this.removeLoadedScenes(scenes); this.loadDummyProducts(scenes); + this.removeLoadedScenes(scenes); } ) ); diff --git a/src/app/services/hyp3.service.ts b/src/app/services/hyp3.service.ts index fc42e756b..b7b659a20 100644 --- a/src/app/services/hyp3.service.ts +++ b/src/app/services/hyp3.service.ts @@ -118,6 +118,10 @@ export class Hyp3Service { jobOptions.name = options.projectName; } + if (!jobOptions.name) { + delete jobOptions.name; + } + return jobOptions; }); } diff --git a/src/app/store/scenes/scenes.reducer.ts b/src/app/store/scenes/scenes.reducer.ts index 272656fcb..ac1e387dc 100644 --- a/src/app/store/scenes/scenes.reducer.ts +++ b/src/app/store/scenes/scenes.reducer.ts @@ -90,7 +90,6 @@ export function scenesReducer(state = initState, action: ScenesActions): ScenesS searchResults = searchResults.concat(subproducts) - const products = searchResults .reduce((total, product) => { if (product.isDummyProduct && isAlreadyLoaded(product, state.products[product.id])) { @@ -160,10 +159,13 @@ export function scenesReducer(state = initState, action: ScenesActions): ScenesS const product = cmrData[jobProduct.name]; if(!!product) { + if (!jobProduct.metadata.job) { + return; + } let job = { ...jobProduct.metadata.job, job_parameters: { - ...jobProduct.metadata.job.job_parameters, + ...jobProduct.metadata.job?.job_parameters, } }; const jobFile = !!job.files ?