diff --git a/packages/core/ui/layouts/root-layout/root-layout-common.ts b/packages/core/ui/layouts/root-layout/root-layout-common.ts index 981c636e3..5af969c18 100644 --- a/packages/core/ui/layouts/root-layout/root-layout-common.ts +++ b/packages/core/ui/layouts/root-layout/root-layout-common.ts @@ -114,7 +114,7 @@ export class RootLayoutBase extends GridLayout { if (this.shadeCover) { // update shade cover with the topmost popupView options (if not specifically told to ignore) - if (!poppedView?.options?.shadeCover.ignoreShadeRestore) { + if (!poppedView?.options?.shadeCover?.ignoreShadeRestore) { const shadeCoverOptions = this.popupViews[this.popupViews.length - 1]?.options?.shadeCover; if (shadeCoverOptions) { this.updateShadeCover(this.shadeCover, shadeCoverOptions); @@ -122,7 +122,7 @@ export class RootLayoutBase extends GridLayout { } // remove shade cover animation if this is the last opened popup view if (this.popupViews.length === 0) { - this.closeShadeCover(poppedView.options.shadeCover); + this.closeShadeCover(poppedView?.options?.shadeCover); } }