From c32c3c137028e32695a5464b7a7fc9faa3f13d96 Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Sun, 6 May 2018 01:46:35 +0900
Subject: [PATCH] Fix bug

---
 src/models/note.ts            | 4 ++--
 src/server/web/views/note.pug | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/models/note.ts b/src/models/note.ts
index 3256a8c15..b2b93453e 100644
--- a/src/models/note.ts
+++ b/src/models/note.ts
@@ -286,7 +286,7 @@ export const pack = async (
 					_id: -1
 				}
 			});
-			return prev ? prev._id : null;
+			return prev ? prev._id.toHexString() : null;
 		})();
 
 		// Get next note info
@@ -304,7 +304,7 @@ export const pack = async (
 					_id: 1
 				}
 			});
-			return next ? next._id : null;
+			return next ? next._id.toHexString() : null;
 		})();
 
 		if (_note.replyId) {
diff --git a/src/server/web/views/note.pug b/src/server/web/views/note.pug
index 8cb1d954d..bc8dcdab8 100644
--- a/src/server/web/views/note.pug
+++ b/src/server/web/views/note.pug
@@ -21,6 +21,6 @@ block meta
 	meta(property='og:image'       content= img)
 
 	if note.prev
-		link(rel='prev' href=`${config.url}/notes/${note.prev.id}`)
+		link(rel='prev' href=`${config.url}/notes/${note.prev}`)
 	if note.next
-		link(rel='next' href=`${config.url}/notes/${note.next.id}`)
+		link(rel='next' href=`${config.url}/notes/${note.next}`)