diff --git a/MediaBrowser.WebDashboard/Html/scripts/site.js b/MediaBrowser.WebDashboard/Html/scripts/site.js
index d2c9526ed5..7ecaff85bf 100644
--- a/MediaBrowser.WebDashboard/Html/scripts/site.js
+++ b/MediaBrowser.WebDashboard/Html/scripts/site.js
@@ -54,9 +54,13 @@ var Dashboard = {
Dashboard.getCurrentUser();
}
- // Re-render the header
- $('.header').remove();
- Dashboard.ensureHeader($.mobile.activePage);
+ var header = $('.header', $.mobile.activePage);
+
+ if (header.length) {
+ // Re-render the header
+ header.remove();
+ Dashboard.ensureHeader($.mobile.activePage);
+ }
},
getCurrentUserId: function () {