mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 23:15:48 +01:00
fixed crash if empty topic was loaded without ajaxify
This commit is contained in:
@@ -259,6 +259,16 @@ var winston = require('winston'),
|
||||
});
|
||||
}
|
||||
|
||||
ThreadTools.getLatestUndeletedPost = function(tid, callback) {
|
||||
ThreadTools.getLatestUndeletedPid(tid, function(err, pid) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
posts.getPostData(pid, callback);
|
||||
});
|
||||
}
|
||||
|
||||
ThreadTools.getLatestUndeletedPid = function(tid, callback) {
|
||||
db.getSortedSetRevRange('tid:' + tid + ':posts', 0, -1, function(err, pids) {
|
||||
if(err) {
|
||||
|
||||
Reference in New Issue
Block a user