Compare commits

...
3 Commits
Author SHA1 Message Date
qingwei.li 6540e7370d -> v0.4.2 2016-11-28 12:34:05 +08:00
qingwei.li f3853d8e7f bump 0.4.2 2016-11-28 12:33:54 +08:00
qingwei.li 93ddf08615 fix code error 2016-11-28 12:33:25 +08:00
5 changed files with 22 additions and 6 deletions
+4
View File
@@ -1,3 +1,7 @@
## 0.4.2
## Bug fixes
- Correct catch ajax error
## 0.4.1
## Bug fixes
- catch ajax error
+8 -2
View File
@@ -13,8 +13,14 @@ var ajax = function (url, options) {
xhr.send();
return {
then: function (cb) { return xhr.addEventListener('load', cb); },
catch: function (cb) { return xhr.addEventListener('error', cb); }
then: function (cb) {
xhr.addEventListener('load', cb);
return this
},
catch: function (cb) {
xhr.addEventListener('error', cb);
return this
}
}
};
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "docsify",
"version": "0.4.1",
"version": "0.4.2",
"description": "A magical documentation generator.",
"main": "lib/docsify.js",
"files": [
+8 -2
View File
@@ -5,7 +5,13 @@ export default function (url, options = {}) {
xhr.send()
return {
then: cb => xhr.addEventListener('load', cb),
catch: cb => xhr.addEventListener('error', cb)
then: function (cb) {
xhr.addEventListener('load', cb)
return this
},
catch: function (cb) {
xhr.addEventListener('error', cb)
return this
}
}
}