Media: Account for a race condition when deleting an edit gallery frame. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22530 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fefaea2cf1
commit
8af2f4674f
@ -740,7 +740,8 @@ window.wp = window.wp || {};
|
||||
// Create a single-use frame. If the frame is closed,
|
||||
// then detach it from the DOM and remove the reference.
|
||||
this.frame.on( 'close', function() {
|
||||
this.frame.detach();
|
||||
if ( this.frame )
|
||||
this.frame.detach();
|
||||
delete this.frame;
|
||||
}, this );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user