File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -151,14 +151,18 @@ export class FrameBase extends CustomLayoutView {
151151 public onUnloaded ( ) {
152152 // Property page refers to the page this frame is nested into
153153 const parentFrame = this . page ?. frame ;
154- const frameEntryLoadedCallback = this . _frameEntryLoadedCallback ;
155154
156155 super . onUnloaded ( ) ;
157- this . _frameEntryLoadedCallback = null ;
158156
159157 // This is a precaution in case the method is called asynchronously during the loading procedure
160- if ( parentFrame && frameEntryLoadedCallback ) {
161- parentFrame . off ( FRAME_ENTRY_LOADED_EVENT , frameEntryLoadedCallback ) ;
158+ if ( this . _frameEntryLoadedCallback ) {
159+ const cb = this . _frameEntryLoadedCallback ;
160+
161+ this . _frameEntryLoadedCallback = null ;
162+
163+ if ( parentFrame ) {
164+ parentFrame . off ( FRAME_ENTRY_LOADED_EVENT , cb ) ;
165+ }
162166 }
163167 }
164168
You can’t perform that action at this time.
0 commit comments