Computed and Maximum call stack size exceeded

Viewed 115

I have component with computed:

computed: {
 pages() {
  return Math.ceil(this.$store.state.filter.totalParts / 18);
 }
},

In parent i have axios with request:

  clearTimeout(this.filteredCategoriesTimer);
   this.filteredCategoriesTimer = setTimeout(() => {
   axios.get('/shop', {
      params: {
        page: 1,
        per_page: 18,
        part_category_tags: this.checkedCategories
      }
    }).then((response) => {
        this.$store.commit(
          'addTotalParts',
          response.data.totalParts
        );

     })
    }, 0);

and store:

addTotalParts(state, payload) {
  state.totalParts = payload;
},

I got error with Maximum call stack size exceeded.

What i need to change for correct error?

0 Answers
Related