@@ -94,6 +94,11 @@ module.exports = function(crowi) {
};
pageSchema.methods.isCreator = function(userData) {
+ // ゲスト閲覧の場合は userData に false が入る
+ if (!userData) {
+ return false;
+ }
+
if (this.populated('creator') && this.creator._id.toString() === userData._id.toString()) {
return true;
} else if (this.creator.toString() === userData._id.toString()) {