diff --git a/integration-libs/opf/base/core/facade/opf-global-functions.service.ts b/integration-libs/opf/base/core/facade/opf-global-functions.service.ts index e6630c00318..08ed7209b5c 100644 --- a/integration-libs/opf/base/core/facade/opf-global-functions.service.ts +++ b/integration-libs/opf/base/core/facade/opf-global-functions.service.ts @@ -63,14 +63,21 @@ export class OpfGlobalFunctionsService implements OpfGlobalFunctionsFacade { return window.Opf.payments; } - protected startLoaderSpinner(vcr: ViewContainerRef) { + protected startLoaderSpinner( + vcr: ViewContainerRef + ): void | Observable | undefined> { return this.launchDialogService.launch( LAUNCH_CALLER.PLACE_ORDER_SPINNER, vcr ); } - protected stopLoaderSpinner(overlayedSpinner: Observable>) { + protected stopLoaderSpinner( + overlayedSpinner: void | Observable | undefined> + ): void { + if (!overlayedSpinner) { + return; + } overlayedSpinner .subscribe((component) => { this.launchDialogService.clear(LAUNCH_CALLER.PLACE_ORDER_SPINNER);