Browse Source

fix find template page tags on server

yusuketk 7 years ago
parent
commit
e6ac459d02
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/server/models/page.js

+ 2 - 3
src/server/models/page.js

@@ -937,9 +937,8 @@ module.exports = function(crowi) {
     else if (decendantsTemplate) {
     else if (decendantsTemplate) {
       templateBody = decendantsTemplate.revision.body;
       templateBody = decendantsTemplate.revision.body;
     }
     }
-
-    if (templates > 0) {
-      templateTags = await templates[0].getRelatedTagsById();
+    if (templates.length > 0) {
+      templateTags = await templates[0].findRelatedTagsById();
     }
     }
 
 
     return { templateBody, templateTags };
     return { templateBody, templateTags };