Skip to content

Commit

Permalink
Avoid lonely question mark for GridField URLs in CMS
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Jul 13, 2012
1 parent 78038eb commit c493dc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/javascript/LeftAndMain.js
Expand Up @@ -714,7 +714,8 @@ jQuery.noConflict();
showDetailView: function(url) {
// Include any GET parameters from the current URL, as the view state might depend on it.
// For example, a list prefiltered through external search criteria might be passed to GridField.
url = $.path.addSearchParams(url, window.location.search.replace(/^\?/, ''));
var params = window.location.search.replace(/^\?/, '');
if(params) url = $.path.addSearchParams(url, params);
$('.cms-container').loadPanel(url);
}
});
Expand Down

0 comments on commit c493dc7

Please sign in to comment.