mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
check pid before setting cache
This commit is contained in:
@@ -25,7 +25,7 @@ module.exports = function(Posts) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
if (global.env === 'production') {
|
||||
if (global.env === 'production' && data.postData.pid) {
|
||||
cache.set(data.postData.pid, data.postData.content);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user