WordPress.org

Making WordPress.org

Changeset 1279


Ignore:
Timestamp:
02/18/2015 06:44:21 PM (6 years ago)
Author:
obenland
Message:

WP.org Themes: Only try to expand themes once on query success.

Prevents a bug on single theme views, where on every subsequent query success
it would try to expand the modal for the initially called theme.

See #745.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js

    r1276 r1279  
    548548            // Open the modal when matching the route for a single themes.
    549549            wp.themes.router.on( 'route:preview', function( slug ) {
    550                 this.listenTo( self.view.collection, 'query:success', function() {
     550                this.listenToOnce( self.view.collection, 'query:success', function() {
    551551                    self.view.view.expand( slug );
    552552                });
Note: See TracChangeset for help on using the changeset viewer.