mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 23:57:41 +02:00
Media: Check that a router region exists before attempting to access its child views. Add relevant documentation. see #22930.
git-svn-id: http://core.svn.wordpress.org/trunk@23260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1132f798f7
commit
774df9900e
@ -522,7 +522,10 @@
|
|||||||
router = frame.router.get(),
|
router = frame.router.get(),
|
||||||
mode = frame.content.mode();
|
mode = frame.content.mode();
|
||||||
|
|
||||||
if ( this.active && ! selection.length && ! router.get( mode ) )
|
// If the state is active, no items are selected, and the current
|
||||||
|
// content mode is not an option in the state's router (provided
|
||||||
|
// the state has a router), reset the content mode to the default.
|
||||||
|
if ( this.active && ! selection.length && router && ! router.get( mode ) )
|
||||||
this.frame.content.render( this.get('content') );
|
this.frame.content.render( this.get('content') );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user