mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
fix code error
This commit is contained in:
parent
7c05d729b4
commit
93ddf08615
@ -1,3 +1,7 @@
|
||||
## 0.4.2
|
||||
## Bug fixes
|
||||
- Correct catch ajax error
|
||||
|
||||
## 0.4.1
|
||||
## Bug fixes
|
||||
- catch ajax error
|
||||
|
||||
10
src/ajax.js
10
src/ajax.js
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user