Browse Source

BugFix: set revision to renderVars only when portalPage is exists

Yuki Takei 8 years ago
parent
commit
9eb84f0acc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/routes/page.js

+ 1 - 1
lib/routes/page.js

@@ -167,9 +167,9 @@ module.exports = function(crowi, app) {
     Page.hasPortalPage(path, req.user, req.query.revision)
     .then(function(portalPage) {
       renderVars.page = portalPage;
-      renderVars.revision = portalPage.revision;
 
       if (portalPage) {
+        renderVars.revision = portalPage.revision;
         return Revision.findRevisionList(portalPage.path, {});
       } else {
         return Promise.resolve([]);