Commit 151a4760 authored by JC Brand's avatar JC Brand

Find more cases of `children` that should be `find`.

parent ed010812
...@@ -242,10 +242,10 @@ ...@@ -242,10 +242,10 @@
* (Object) attrs: An object containing the message attributes. * (Object) attrs: An object containing the message attributes.
*/ */
var msg_dates, idx, var msg_dates, idx,
$first_msg = this.$content.children('.chat-message:first'), $first_msg = this.$content.find('.chat-message:first'),
first_msg_date = $first_msg.data('isodate'), first_msg_date = $first_msg.data('isodate'),
current_msg_date = moment(attrs.time) || moment, current_msg_date = moment(attrs.time) || moment,
last_msg_date = this.$content.children('.chat-message:last').data('isodate'); last_msg_date = this.$content.find('.chat-message:last').data('isodate');
if (!first_msg_date) { if (!first_msg_date) {
// This is the first received message, so we insert a // This is the first received message, so we insert a
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
} }
// Find the correct place to position the message // Find the correct place to position the message
current_msg_date = current_msg_date.format(); current_msg_date = current_msg_date.format();
msg_dates = _.map(this.$content.children('.chat-message'), function (el) { msg_dates = _.map(this.$content.find('.chat-message'), function (el) {
return $(el).data('isodate'); return $(el).data('isodate');
}); });
msg_dates.push(current_msg_date); msg_dates.push(current_msg_date);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment