Commit b79a98c7 authored by hetech's avatar hetech Committed by 杨奕

MessageBox: wrap hashchange listener in nextTick (#11200)

parent c6e9cdac
...@@ -273,9 +273,11 @@ ...@@ -273,9 +273,11 @@
}, },
mounted() { mounted() {
if (this.closeOnHashChange) { this.$nextTick(() => {
window.addEventListener('hashchange', this.close); if (this.closeOnHashChange) {
} window.addEventListener('hashchange', this.close);
}
});
}, },
beforeDestroy() { beforeDestroy() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment