Переглянути джерело

fix find template page tags on server

yusuketk 7 роки тому
батько
коміт
e6ac459d02
1 змінених файлів з 2 додано та 3 видалено
  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) {
       templateBody = decendantsTemplate.revision.body;
     }
-
-    if (templates > 0) {
-      templateTags = await templates[0].getRelatedTagsById();
+    if (templates.length > 0) {
+      templateTags = await templates[0].findRelatedTagsById();
     }
 
     return { templateBody, templateTags };