Skip to content

Commit a3938b2

Browse files
committed
fix($core): NodeList.prototype.forEach doesn't exist in IE11
1 parent 2a4e37f commit a3938b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@vuepress/core/lib/app/root-mixins/updateLoadingState.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export default {
22
created () {
33
this.$vuepress.$on('AsyncMarkdownContentMounted', () => {
4-
this.$vuepress.$set('contentMounted', true)
4+
this.$vuepress.$set('contentMounted', true);
55

6-
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
6+
[].slice.call(document.querySelectorAll('a[href^="#"]')).forEach(anchor => {
77
anchor.addEventListener('click', function (e) {
88
e.preventDefault()
99
history.pushState(history.state, document.title, e.target.href)

0 commit comments

Comments
 (0)