mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-04-24 05:06:08 +08:00
fix code error
This commit is contained in:
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user