Skip to content

Commit

Permalink
fix: IE10 compatibility (#691)
Browse files Browse the repository at this point in the history
* fix: IE10 compatibility

* chore: use built-in helper fn
  • Loading branch information
cheng-kang authored and QingWei-Li committed Nov 12, 2018
1 parent a72e749 commit 4db8cd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/render/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class Compiler {
}
href = router.toURL(href, null, router.getCurrentPath())
} else {
attrs += href.startsWith('mailto:') ? '' : ` target="${linkTarget}"`
attrs += href.indexOf('mailto:') === 0 ? '' : ` target="${linkTarget}"`
}

if (config.target) {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function escapeHtml(string) {
function getAllPaths(router) {
const paths = []

document.querySelectorAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(node => {
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 Down

0 comments on commit 4db8cd6

Please sign in to comment.