mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-23 12:16:10 +10:00
feat(fetch): add requestHeaders option, fixed #336
This commit is contained in:
@@ -165,9 +165,11 @@ export function init (config, vm) {
|
||||
paths.forEach(path => {
|
||||
if (INDEXS[path]) return count++
|
||||
|
||||
helper.get(vm.router.getFile(path)).then(result => {
|
||||
INDEXS[path] = genIndex(path, result, vm.router, config.depth)
|
||||
len === ++count && saveData(config.maxAge)
|
||||
})
|
||||
helper
|
||||
.get(vm.router.getFile(path), false, vm.config.requestHeaders)
|
||||
.then(result => {
|
||||
INDEXS[path] = genIndex(path, result, vm.router, config.depth)
|
||||
len === ++count && saveData(config.maxAge)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user