title: How to solve Maximum call stack size exceeded Error in nuxt.js
body: <p>I'm trying to get data from firebase using axios. I'm using vuex store to handle all my data .</p>
  
  <p>I've this two actions to get the data and store it : </p>
  
  <pre><code>nuxtServerInit(vuexContext, context) {
          return axios
            .get("https://nuxt-blog.firebaseio.com/posts.json")
            .then(res =&gt; {
              const postsArray = [];
              for (const key in res.data) {
                postsArray.push({ ...res.data[key], id: key });
              }
              vuexContext.commit("setPosts", postsArray);
            })
            .catch(e =&gt; context.error(e));
        },
        setPosts(vuexContext, posts) {
          vuexContext.commit("setPosts", posts);
        }
  </code></pre>
  
  <p>I don't know what is wrong with this code but it gives me this errors :</p>
  
  <p><a href="https://i.stack.imgur.com/7uMoY.png" rel="noreferrer">Maximum call stack size exceeded</a></p>
  
  <p><a href="https://i.stack.imgur.com/VTjQu.png" rel="noreferrer">errors on terminal</a></p>