diff --git a/webroot/js/ajax.js b/webroot/js/ajax.js
index <HASH>..<HASH> 100644
--- a/webroot/js/ajax.js
+++ b/webroot/js/ajax.js
@@ -58,6 +58,8 @@
         ajax('#fetch-menu-items', url);
     });
 
-    //Run on load.
-    ajax('#fetch-menu-items', getUrl());
+    if ($('#fetch-menu-items').length) {
+        //Run on load.
+        ajax('#fetch-menu-items', getUrl());
+    }
 })(jQuery);
Run when it exists (task #<I>)