Skip to content

fix: IE10 compatibility #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 12, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: use built-in helper fn
  • Loading branch information
Kang Cheng committed Nov 7, 2018
commit b55cf4e602f9e9fc73752e1aa96d50771fdf304b
6 changes: 2 additions & 4 deletions src/plugins/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ function escapeHtml(string) {
function getAllPaths(router) {
const paths = []

const nodes = document.querySelectorAll('.sidebar-nav a:not(.section-link):not([data-nosearch])')
for (var i = 0; i < nodes.length; i += 1) {
const node = nodes[i]
Docsify.dom.findAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(node => {
const href = node.href
const originHref = node.getAttribute('href')
const path = router.parse(href).path
Expand All @@ -30,7 +28,7 @@ function getAllPaths(router) {
) {
paths.push(path)
}
}
})

return paths
}
Expand Down