Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

修正 list_categories的bug #484

Merged
merged 1 commit into from

2 participants

@chenall

修正使用list_categories会有重复分类的BUG.

相关问题 #427 #479

@tommy351 tommy351 merged commit b295c2c into from
@chenall chenall deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 9, 2014
  1. @chenall

    fix #427, #479

    chenall authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/plugins/helper/list.js
View
5 lib/plugins/helper/list.js
@@ -64,7 +64,10 @@ exports.list_categories = function(categories, options){
html += '</li>';
- if (i == 0 && depth > -1) arr.push(html);
+ if (i == 0 && depth > -1) {
+ arr.push(html);
+ html = '';
+ }
} else {
arr.push('<a class="' + className + '-link" href="' + root + cat.path + '">' +
cat.name +
Something went wrong with that request. Please try again.