mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 05:16:06 +10:00
fix code error
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
## 0.4.2
|
||||
## Bug fixes
|
||||
- Correct catch ajax error
|
||||
|
||||
## 0.4.1
|
||||
## Bug fixes
|
||||
- catch ajax error
|
||||
|
||||
+8
-2
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user