Fix Right Now comments counts when only one comment exists
git-svn-id: https://develop.svn.wordpress.org/trunk@12294 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a03d21af84
commit
b83aada923
@ -106,14 +106,12 @@ setCommentsList = function() {
|
||||
total = $('span.total-count', dash);
|
||||
appr = $('span.approved-count', dash);
|
||||
totalN = getCount(total);
|
||||
apprN = getCount(appr);
|
||||
|
||||
if ( totalN ) {
|
||||
totalN = totalN + n;
|
||||
apprN = totalN - getCount( $('span.pending-count', dash) ) - getCount( $('span.spam-count', dash) );
|
||||
updateCount(total, totalN);
|
||||
updateCount(appr, apprN);
|
||||
}
|
||||
totalN = totalN + n;
|
||||
apprN = totalN - getCount( $('span.pending-count', dash) ) - getCount( $('span.spam-count', dash) );
|
||||
updateCount(total, totalN);
|
||||
updateCount(appr, apprN);
|
||||
|
||||
}
|
||||
|
||||
function getCount(el) {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user