Skip to content

Node.js based forum software built for the modern web

if post is not found go to 404

barisusaklibf3f19253f17
diff --git a/src/controllers/posts.js b/src/controllers/posts.js
index c8b490f65b..be96fa7e43 100644
--- a/src/controllers/posts.js
+++ b/src/controllers/posts.js
@@ -12,7 +12,7 @@ postsController.redirectToPost = function(req, res, callback) {
}
posts.generatePostPath(pid, req.uid, function(err, path) {
- if (err) {
+ if (err || !path) {
return callback(err);
}