Merge lp:~deryck/launchpad/tags-count-typo-670352 into lp:launchpad

Proposed by Deryck Hodge
Status: Merged
Approved by: Deryck Hodge
Approved revision: no longer in the source branch.
Merged at revision: 11855
Proposed branch: lp:~deryck/launchpad/tags-count-typo-670352
Merge into: lp:launchpad
Diff against target: 12 lines (+1/-1)
1 file modified
lib/lp/bugs/javascript/official_bug_tags.js (+1/-1)
To merge this branch: bzr merge lp:~deryck/launchpad/tags-count-typo-670352
Reviewer Review Type Date Requested Status
Deryck Hodge (community) Approve
Review via email: mp+39982@code.launchpad.net

Commit message

Prevent {count} from showing up on official bug tags management page when item.count is undefined.

Description of the change

This branch fixes the official bug tag management page to not show {count} when there are no bugs for a tag. This was a JavaScript error where the script was only checking for 0 and not for undefined also.

To post a comment you must log in.
Revision history for this message
Deryck Hodge (deryck) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/javascript/official_bug_tags.js'
2--- lib/lp/bugs/javascript/official_bug_tags.js 2010-07-11 00:32:53 +0000
3+++ lib/lp/bugs/javascript/official_bug_tags.js 2010-11-03 15:57:48 +0000
4@@ -160,7 +160,7 @@
5 * @method make_tag_li
6 */
7 var make_tag_li = function(item) {
8- if (item.count === 0) {
9+ if (item.count === 0 || item.count === undefined) {
10 item.count = '';
11 }
12 item._tag_id = mangle_id(item.tag);