Преглед изворни кода

fix error when create page without template

yusuketk пре 7 година
родитељ
комит
08d0b4b7a2
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/server/routes/page.js

+ 1 - 1
src/server/routes/page.js

@@ -418,7 +418,7 @@ module.exports = function(crowi, app) {
       // retrieve templates
       const template = await Page.findTemplate(path);
 
-      if (template != null) {
+      if (template.templateBody) {
         const body = replacePlaceholdersOfTemplate(template.templateBody, req);
         const tags = template.templateTags;
         renderVars.template = body;