mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-18 12:35:03 +00:00
Media: Account for a race condition when deleting an edit gallery frame. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9c20d148b9
commit
944066ef83
@ -740,7 +740,8 @@ window.wp = window.wp || {};
|
|||||||
// Create a single-use frame. If the frame is closed,
|
// Create a single-use frame. If the frame is closed,
|
||||||
// then detach it from the DOM and remove the reference.
|
// then detach it from the DOM and remove the reference.
|
||||||
this.frame.on( 'close', function() {
|
this.frame.on( 'close', function() {
|
||||||
this.frame.detach();
|
if ( this.frame )
|
||||||
|
this.frame.detach();
|
||||||
delete this.frame;
|
delete this.frame;
|
||||||
}, this );
|
}, this );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user