diff --git a/src/bp-templates/bp-nouveau/js/buddypress-nouveau.js b/src/bp-templates/bp-nouveau/js/buddypress-nouveau.js index e2737ef518..0bd2d8d68d 100644 --- a/src/bp-templates/bp-nouveau/js/buddypress-nouveau.js +++ b/src/bp-templates/bp-nouveau/js/buddypress-nouveau.js @@ -529,6 +529,10 @@ window.bp = window.bp || {}; this.setStorage( 'bp-' + data.object, 'extras', data.extras ); } + if ( ! _.isUndefined( data.ajaxload ) && false === data.ajaxload ) { + return false; + } + /* Set the correct selected nav and filter */ $( this.objectNavParent + ' [data-bp-object]' ).each( function () { @@ -538,10 +542,6 @@ window.bp = window.bp || {}; } ); - if ( ! _.isUndefined( data.ajaxload ) && false === data.ajaxload ) { - return false; - } - if ( $( this.objectNavParent + ' [data-bp-scope="' + data.scope + '"]' ).length ) { $( this.objectNavParent + ' [data-bp-scope="' + data.scope + '"], #object-nav li.current' ).addClass( 'selected loading' ); } else {