We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b023a6 commit b2e3fbdCopy full SHA for b2e3fbd
packages/core/ui/frame/frame-common.ts
@@ -144,11 +144,14 @@ export class FrameBase extends CustomLayoutView {
144
145
@profile
146
public onUnloaded() {
147
+ // Property page refers to the page this frame is nested into
148
+ const parentFrame = this.page?.frame;
149
+
150
super.onUnloaded();
151
152
// This is a precaution in case the method is called asynchronously during the loading procedure
- if (this.hasListeners(FRAME_ENTRY_LOADED_EVENT)) {
- this.off(FRAME_ENTRY_LOADED_EVENT);
153
+ if (parentFrame && parentFrame.hasListeners(FRAME_ENTRY_LOADED_EVENT)) {
154
+ parentFrame.off(FRAME_ENTRY_LOADED_EVENT);
155
}
156
157
0 commit comments