Skip to content

Commit

Permalink
fix: Storefront crashes while injecting ModalService before app boots…
Browse files Browse the repository at this point in the history
…trap (#12648)
  • Loading branch information
WeizhengSap committed Jun 2, 2021
1 parent d4a3329 commit a8e3fd5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ export class ModalService {
protected featureConfigService?: FeatureConfigService
) {}

protected readonly rootComponent = this.applicationRef?.components?.[0]
.location?.nativeElement;
protected get rootComponent() {
return this.applicationRef?.components?.[0]?.location?.nativeElement;
}

open(content: any, options?: ModalOptions): ModalRef {
let activeModal: ModalRef;
Expand Down

0 comments on commit a8e3fd5

Please sign in to comment.