From 005ab295503b33ec669c6553891d9cefde6f1e31 Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Tue, 21 Jun 2016 10:39:23 -0700 Subject: [PATCH] Fix how we check for meta and make sure it isn't None --- sphinx_rtd_theme/breadcrumbs.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sphinx_rtd_theme/breadcrumbs.html b/sphinx_rtd_theme/breadcrumbs.html index 321f5450..c97b09ff 100644 --- a/sphinx_rtd_theme/breadcrumbs.html +++ b/sphinx_rtd_theme/breadcrumbs.html @@ -6,11 +6,17 @@ {% set suffix = source_suffix %} {% endif %} -{% if meta is defined and 'github_url' in meta %} +{% if meta is defined and meta is not none %} +{% set check_meta = True %} +{% else %} +{% set check_meta = False %} +{% endif %} + +{% if check_meta and 'github_url' in meta %} {% set display_github = True %} {% endif %} -{% if meta is defined and 'bitbucket_url' in meta %} +{% if check_meta and 'bitbucket_url' in meta %} {% set display_bitbucket = True %} {% endif %} @@ -24,14 +30,14 @@
  • {% if pagename != "search" %} {% if display_github %} - {% if meta is defined and 'github_url' in meta %} + {% if check_meta and 'github_url' in meta %} Edit on GitHub {% else %} Edit on GitHub {% endif %} {% elif display_bitbucket %} - {% if meta is defined and 'bitbucket_url' in meta %} + {% if check_meta and 'bitbucket_url' in meta %} Edit on Bitbucket {% else %}