diff --git a/material/assets/javascripts/application.js b/material/assets/javascripts/application.js
index ba9411c57..4abd3a303 100644
--- a/material/assets/javascripts/application.js
+++ b/material/assets/javascripts/application.js
@@ -739,6 +739,7 @@ var Application =
/* Retrieve the facts for the given repository type */
;(function () {
var el = document.querySelector("[data-md-source]");
+ if (!el) return Promise.resolve([]);
switch (el.dataset.mdSource) {
case "github":
return new _Material2.default.Source.Adapter.GitHub(el).fetch();
diff --git a/material/partials/header.html b/material/partials/header.html
index 15745a862..f545e3fb9 100644
--- a/material/partials/header.html
+++ b/material/partials/header.html
@@ -34,13 +34,13 @@
{% endblock %}
-
+ {% endif %}
+ {% endblock %}
diff --git a/src/assets/javascripts/application.js b/src/assets/javascripts/application.js
index 9c8f66d66..ae1b693b8 100644
--- a/src/assets/javascripts/application.js
+++ b/src/assets/javascripts/application.js
@@ -196,6 +196,7 @@ export default class Application {
/* Retrieve the facts for the given repository type */
;(() => {
const el = document.querySelector("[data-md-source]")
+ if (!el) return Promise.resolve([])
switch (el.dataset.mdSource) {
case "github": return new Material.Source.Adapter.GitHub(el).fetch()
default: return Promise.resolve([])
diff --git a/src/partials/header.html b/src/partials/header.html
index 719337b6a..82e5f24ef 100644
--- a/src/partials/header.html
+++ b/src/partials/header.html
@@ -74,13 +74,13 @@
-
+ {% endif %}
+ {% endblock %}