From 9a380cd43e2ebff852155647e83b803b82a8a94b Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Wed, 30 Dec 2020 16:58:14 +0100 Subject: [PATCH] fix(core): prevent circular reference Frame <> Page (#9111) --- packages/core/ui/page/page-common.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/ui/page/page-common.ts b/packages/core/ui/page/page-common.ts index 62c574842..a46095af0 100644 --- a/packages/core/ui/page/page-common.ts +++ b/packages/core/ui/page/page-common.ts @@ -6,7 +6,7 @@ import { Property, CssProperty } from '../core/properties'; import { Style } from '../styling/style'; import { Color } from '../../color'; import { EventData } from '../../data/observable'; -import { Frame } from '../frame'; +import type { Frame } from '../frame'; import { ActionBar } from '../action-bar'; import { KeyframeAnimationInfo } from '../animation/keyframe-animation'; import { profile } from '../../profiling'; @@ -94,7 +94,7 @@ export class PageBase extends ContentView { get frame(): Frame { const frame = this.parent; - return frame instanceof Frame ? frame : undefined; + return (frame && frame.constructor.name === 'Frame') ? frame as Frame : undefined; } private createNavigatedData(eventName: string, isBackNavigation: boolean): NavigatedData {