diff --git a/javascript/GridField.js b/javascript/GridField.js
index 746f6fbf6..09bfec7d0 100644
--- a/javascript/GridField.js
+++ b/javascript/GridField.js
@@ -40,16 +40,19 @@
// multiple relationships via keyboard.
if(focusedElName) self.find(':input[name="' + focusedElName + '"]').focus();
- var content;
- if(ajaxOpts.data[0].filter=="show"){
- content = '';
- self.addClass('show-filter').find('.filter-header').show();
- }else{
- content = '';
- self.removeClass('show-filter').find('.filter-header').hide();
- }
+ // Update filter
+ if(self.find('.filter-header').length) {
+ var content;
+ if(ajaxOpts.data[0].filter=="show") {
+ content = '';
+ self.addClass('show-filter').find('.filter-header').show();
+ } else {
+ content = '';
+ self.removeClass('show-filter').find('.filter-header').hide();
+ }
- self.find('.sortable-header th:last').html(content);
+ self.find('.sortable-header th:last').html(content);
+ }
form.removeClass('loading');
if(successCallback) successCallback.apply(this, arguments);