Skip to content

Commit 4db8cd6

Browse files
cheng-kangQingWei-Li
authored andcommitted
fix: IE10 compatibility (#691)
* fix: IE10 compatibility * chore: use built-in helper fn
1 parent a72e749 commit 4db8cd6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core/render/compiler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export class Compiler {
241241
}
242242
href = router.toURL(href, null, router.getCurrentPath())
243243
} else {
244-
attrs += href.startsWith('mailto:') ? '' : ` target="${linkTarget}"`
244+
attrs += href.indexOf('mailto:') === 0 ? '' : ` target="${linkTarget}"`
245245
}
246246

247247
if (config.target) {

src/plugins/search/search.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function escapeHtml(string) {
1616
function getAllPaths(router) {
1717
const paths = []
1818

19-
document.querySelectorAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(node => {
19+
Docsify.dom.findAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(node => {
2020
const href = node.href
2121
const originHref = node.getAttribute('href')
2222
const path = router.parse(href).path

0 commit comments

Comments
 (0)