Skip to content

Commit

Permalink
refactor(geo): refactor based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
pelord committed Mar 13, 2024
1 parent df2f8a4 commit eb28d76
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/app/pages/portal/portal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1451,18 +1451,15 @@ export class PortalComponent implements OnInit, OnDestroy {
type: data.type,
lastModified: Date.now()
});
const epsgCode$: BehaviorSubject<string> = new BehaviorSubject(
undefined
);
detectFileEPSG({ file, epsgCode$ });
epsgCode$
detectFileEPSG({ file })
.pipe(
skipWhile((code) => !code),
first(),
concatMap((epsgCode) => {
const epsg = epsgCode === 'epsgNotDefined' ? undefined : epsgCode;
epsgCode$.next(undefined);
return this.importService.import(file, epsg);
return this.importService.import(
file,
epsgCode === 'epsgNotDefined' ? undefined : epsgCode
);
})
)
.subscribe(
Expand Down

0 comments on commit eb28d76

Please sign in to comment.