Fixed Unicode slugifier breaking table of contents blur on scroll

This commit is contained in:
squidfunk
2019-01-28 09:48:05 +01:00
parent 226a248be6
commit ee0371d026
5 changed files with 9 additions and 4 deletions

View File

@@ -53,8 +53,9 @@ export default class Blur {
/* Index anchor node offsets for fast lookup */
this.anchors_ = [].reduce.call(this.els_, (anchors, el) => {
const hash = decodeURIComponent(el.hash)
return anchors.concat(
document.getElementById(el.hash.substring(1)) || [])
document.getElementById(hash.substring(1)) || [])
}, [])
}