Add error handling in watch_manual_resize().

We now explicitly complain if a caller passes in a bad
selector to this function and return undefined.
This commit is contained in:
Steve Howell
2017-05-11 09:28:33 -07:00
committed by Tim Abbott
parent 35a5ca411a
commit d415d4cf11
2 changed files with 11 additions and 2 deletions

View File

@@ -223,7 +223,9 @@ function edit_message(row, raw_content) {
copy_message.remove();
var edit_id = "#message_edit_content_" + rows.id(row);
var listeners = resize.watch_manual_resize(edit_id);
currently_editing_messages[rows.id(row)].listeners = listeners;
if (listeners) {
currently_editing_messages[rows.id(row)].listeners = listeners;
}
composebox_typeahead.initialize_compose_typeahead(edit_id, {emoji: true, stream: true});
}