fix bugs and errors
This commit is contained in:
@@ -135,7 +135,7 @@ export default {
|
||||
Link,
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['toggleBvi'])
|
||||
...mapActions(['toggleBvi', 'initializeBvi'])
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -122,8 +122,8 @@ export default {
|
||||
window.addEventListener('scroll', this.handleScroll);
|
||||
|
||||
// Вызываем action, только если на клиенте и $store доступен
|
||||
if (typeof window !== 'undefined' && this.$store && this.initializeBvi) {
|
||||
this.initializeBvi();
|
||||
if (typeof window !== 'undefined' && this.$store && this.$store.dispatch('initializeBvi')) {
|
||||
this.$store.dispatch('initializeBvi');
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user