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