Skip to content

Commit 9a380cd

Browse files
authored
fix(core): prevent circular reference Frame <> Page (#9111)
1 parent 9aad2db commit 9a380cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/core/ui/page/page-common.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Property, CssProperty } from '../core/properties';
66
import { Style } from '../styling/style';
77
import { Color } from '../../color';
88
import { EventData } from '../../data/observable';
9-
import { Frame } from '../frame';
9+
import type { Frame } from '../frame';
1010
import { ActionBar } from '../action-bar';
1111
import { KeyframeAnimationInfo } from '../animation/keyframe-animation';
1212
import { profile } from '../../profiling';
@@ -94,7 +94,7 @@ export class PageBase extends ContentView {
9494
get frame(): Frame {
9595
const frame = this.parent;
9696

97-
return frame instanceof Frame ? frame : undefined;
97+
return (frame && frame.constructor.name === 'Frame') ? frame as Frame : undefined;
9898
}
9999

100100
private createNavigatedData(eventName: string, isBackNavigation: boolean): NavigatedData {

0 commit comments

Comments
 (0)