Browse Source

ensure not to include 'widget/comments.html' when page is not exist

Yuki Takei 9 years ago
parent
commit
e766307fb9
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lib/views/crowi-plus/page.html
  2. 1 1
      lib/views/crowi-plus/page_list.html

+ 1 - 1
lib/views/crowi-plus/page.html

@@ -37,7 +37,7 @@
 {% endblock %}
 
 {% block content_main_after %}
-  {% if not page.isDeleted() %}
+  {% if page and not page.isDeleted() %}
     {% include 'widget/comments.html' %}
   {% endif %}
 {% endblock %}

+ 1 - 1
lib/views/crowi-plus/page_list.html

@@ -37,7 +37,7 @@
 {% endblock %}
 
 {% block content_main_after %}
-  {% if not page.isDeleted() %}
+  {% if page and not page.isDeleted() %}
     {% include 'widget/comments.html' %}
   {% endif %}
 {% endblock %}