diff --git a/frontend_tests/node_tests/activity.js b/frontend_tests/node_tests/activity.js index 04b32cac74..8c79b103b6 100644 --- a/frontend_tests/node_tests/activity.js +++ b/frontend_tests/node_tests/activity.js @@ -383,7 +383,7 @@ run_test('PM_update_dom_counts', () => { buddy_list_add(pm_key, li); count.set_find_results('.value', value); li.set_find_results('.count', count); - count.set_parent(li); + count.set_parents_result('li', li); const counts = new Dict(); counts.set(pm_key, 5); diff --git a/static/js/activity.js b/static/js/activity.js index d69d79d066..22aa7fc8cf 100644 --- a/static/js/activity.js +++ b/static/js/activity.js @@ -33,7 +33,7 @@ exports.new_user_input = true; var huddle_timestamps = new Dict(); function update_pm_count_in_dom(count_span, value_span, count) { - var li = count_span.parent(); + var li = count_span.parents('li'); if (count === 0) { count_span.hide();