properly referencing the tid of the composer instead of blindly checking templates.get('topic_id')

This commit is contained in:
Julian Lam
2014-03-01 17:34:06 -05:00
parent fcb44ae256
commit f2ffc2b533

View File

@@ -390,12 +390,13 @@ define(['taskbar'], function(taskbar) {
composer.createNewComposer(post_uuid); composer.createNewComposer(post_uuid);
} }
var tid = templates.get('topic_id'); var tid = templates.get('topic_id'),
postData = composer.posts[post_uuid];
if (tid) { if (tid) {
// Replying to a topic // Replying to a topic
socket.emit('modules.composer.register', { socket.emit('modules.composer.register', {
uuid: post_uuid, uuid: post_uuid,
tid: templates.get('topic_id'), tid: postData.tid,
uid: app.uid uid: app.uid
}); });
} }