message_edit: Fix traceback saving message edits.

Now that we sometimes call message_edit.end() twice, we need to check
if we've already cleaned it up.

(imported from commit 4e0efa14ba78df0a86b2ae97b99fa1be6197df88)
This commit is contained in:
Tim Abbott 2013-05-28 16:13:49 -04:00
parent 81bb2603eb
commit ab093e7d9a
1 changed files with 4 additions and 2 deletions

View File

@ -66,8 +66,10 @@ exports.start = function (row) {
exports.end = function (row) { exports.end = function (row) {
var message = current_msg_list.get(rows.id(row)); var message = current_msg_list.get(rows.id(row));
delete currently_editing_messages[message.id]; if (currently_editing_messages[message.id] !== undefined) {
current_msg_list.hide_edit_message(row); delete currently_editing_messages[message.id];
current_msg_list.hide_edit_message(row);
}
}; };
exports.maybe_show_edit = function(row, id) { exports.maybe_show_edit = function(row, id) {