Explorar el Código

fix error when create page without template

yusuketk hace 7 años
padre
commit
08d0b4b7a2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;