Skip to content

Commit

Permalink
fix($core): NodeList.prototype.forEach doesn't exist in IE11
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Nov 17, 2018
1 parent 2a4e37f commit a3938b2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default {
created () {
this.$vuepress.$on('AsyncMarkdownContentMounted', () => {
this.$vuepress.$set('contentMounted', true)
this.$vuepress.$set('contentMounted', true);

document.querySelectorAll('a[href^="#"]').forEach(anchor => {
[].slice.call(document.querySelectorAll('a[href^="#"]')).forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault()
history.pushState(history.state, document.title, e.target.href)
Expand Down

0 comments on commit a3938b2

Please sign in to comment.