mirror of
https://github.com/docsifyjs/docsify.git
synced 2026-01-25 15:23:21 +00:00
bump 0.4.1
This commit is contained in:
parent
d556282471
commit
5953ef7739
@ -1,3 +1,7 @@
|
||||
## 0.4.1
|
||||
## Bug fixes
|
||||
- catch ajax error
|
||||
|
||||
## 0.4.0
|
||||
### Features
|
||||
- Custom sidebar
|
||||
|
||||
@ -13,7 +13,8 @@ var ajax = function (url, options) {
|
||||
xhr.send();
|
||||
|
||||
return {
|
||||
then: function (cb) { return xhr.addEventListener('load', cb); }
|
||||
then: function (cb) { return xhr.addEventListener('load', cb); },
|
||||
catch: function (cb) { return xhr.addEventListener('error', cb); }
|
||||
}
|
||||
};
|
||||
|
||||
@ -2293,7 +2294,8 @@ var Docsify = function Docsify (opts) {
|
||||
Docsify.prototype.load = function load () {
|
||||
var this$1 = this;
|
||||
|
||||
ajax(((this.loc) + ".md")).then(function (res) {
|
||||
ajax(((this.loc) + ".md"))
|
||||
.then(function (res) {
|
||||
var target = res.target;
|
||||
if (target.status >= 400) {
|
||||
this$1.render('not found');
|
||||
@ -2304,7 +2306,8 @@ Docsify.prototype.load = function load () {
|
||||
this$1.activeNav(document.querySelector('aside.sidebar'), true);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(function (_) { return this$1.render('not found'); });
|
||||
};
|
||||
|
||||
Docsify.prototype.render = function render$1 (content) {
|
||||
|
||||
2
lib/docsify.min.js
vendored
2
lib/docsify.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user