Skip to content

Commit

Permalink
[build] 4.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Jun 2, 2017
1 parent b12f74b commit ac28040
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![logo](_media/icon.svg)

# docsify <small>4.1.10</small>
# docsify <small>4.1.11</small>

> A magical documentation site generator.
Expand Down
11 changes: 9 additions & 2 deletions lib/docsify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2889,6 +2889,10 @@ Compiler.prototype.sidebar = function sidebar (text, level) {
* Compile sub sidebar
*/
Compiler.prototype.subSidebar = function subSidebar (level) {
if (!level) {
this.toc = [];
return
}
var currentPath = this.router.getCurrentPath();
var ref = this;
var cacheTree = ref.cacheTree;
Expand Down Expand Up @@ -3159,9 +3163,12 @@ function renderMixin (proto) {
var activeEl = getAndActive(this.router, '.sidebar-nav', true, true);
if (loadSidebar && activeEl) {
activeEl.parentNode.innerHTML += this.compiler.subSidebar(subMaxLevel);
} else {
// reset toc
this.compiler.subSidebar();
}
// bind event
this._bindEventOnRendered();
this._bindEventOnRendered(activeEl);
};

proto._bindEventOnRendered = function (activeEl) {
Expand Down Expand Up @@ -3743,7 +3750,7 @@ initGlobalAPI();
/**
* Version
*/
Docsify.version = '4.1.10';
Docsify.version = '4.1.11';

/**
* Run Docsify
Expand Down
4 changes: 2 additions & 2 deletions lib/docsify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/docsify-server-renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docsify-server-renderer",
"version": "4.1.10",
"version": "4.1.11",
"description": "docsify server renderer",
"author": {
"name": "qingwei-li",
Expand Down

0 comments on commit ac28040

Please sign in to comment.