Commit ad9b1495 authored by Byron Jones's avatar Byron Jones

Bug 974411: js/comments.js::toggle_all_comments() shouldn't try to match

non-comment elements r=gerv, a=glob
parent 3ef245b2
......@@ -40,14 +40,17 @@ function toggle_all_comments(action) {
var comment = comments[i];
if (!comment)
continue;
var id = comments[i].id.match(/\d*$/);
var id = comment.id.match(/^comment_text_(\d*)$/);
if (!id)
continue;
id = id[1];
var link = document.getElementById('comment_link_' + id);
if (action == 'collapse')
if (action == 'collapse') {
collapse_comment(link, comment, id);
else
} else {
expand_comment(link, comment, id);
}
}
}
function collapse_comment(link, comment, comment_id) {
......
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