From b3c0ecc161ced836d377fb6118567cad226b36cd Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 6 Jun 2021 17:36:50 +0200 Subject: [PATCH] Fixed error when no analytics provider was set --- material/partials/integrations/analytics.html | 4 +++- src/partials/integrations/analytics.html | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/material/partials/integrations/analytics.html b/material/partials/integrations/analytics.html index 13f7608ef04..b895fa767e3 100644 --- a/material/partials/integrations/analytics.html +++ b/material/partials/integrations/analytics.html @@ -7,4 +7,6 @@ {% if config.extra.analytics %} {% set provider = config.extra.analytics.provider %} {% endif %} -{% include "partials/integrations/analytics/" ~ provider ~ ".html" %} +{% if provider %} + {% include "partials/integrations/analytics/" ~ provider ~ ".html" %} +{% endif %} diff --git a/src/partials/integrations/analytics.html b/src/partials/integrations/analytics.html index b4c3d0bf048..dfc367cf2d7 100644 --- a/src/partials/integrations/analytics.html +++ b/src/partials/integrations/analytics.html @@ -30,5 +30,7 @@ {% set provider = config.extra.analytics.provider %} {% endif %} - -{% include "partials/integrations/analytics/" ~ provider ~ ".html" %} + +{% if provider %} + {% include "partials/integrations/analytics/" ~ provider ~ ".html" %} +{% endif %}