Make WordPress Core

Changeset 23260


Ignore:
Timestamp:
01/04/2013 07:08:37 AM (12 years ago)
Author:
koopersmith
Message:

Media: Check that a router region exists before attempting to access its child views. Add relevant documentation. see #22930.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r23259 r23260  
    523523                mode = frame.content.mode();
    524524
    525             if ( this.active && ! selection.length && ! router.get( mode ) )
     525            // If the state is active, no items are selected, and the current
     526            // content mode is not an option in the state's router (provided
     527            // the state has a router), reset the content mode to the default.
     528            if ( this.active && ! selection.length && router && ! router.get( mode ) )
    526529                this.frame.content.render( this.get('content') );
    527530        },
Note: See TracChangeset for help on using the changeset viewer.