title: After fetching api with axios it sometimes returns undefined under certain conditions
body: <pre><code> &lt;template&gt;
          &lt;div class=&quot;max-w-sm rounded overflow-hidden shadow-lg bg-white&quot;&gt;
              &lt;div class=&quot;px-6 py-4&quot;&gt;
              &lt;div class=&quot;font-bold text-xl mb-2&quot;&gt;{{coin.data.name}} Price Statistics&lt;/div&gt;
                  &lt;table class=&quot;table-fixed&quot;&gt;
                      &lt;tbody&gt;
                          &lt;tr&gt;
                              &lt;th&gt;Price&lt;/th&gt;
                              &lt;td&gt;{{coin.data.market_data.current_price.usd}}&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/template&gt;
      
      &lt;script setup&gt;
      import { api } from '../services/api'
      import { reactive } from 'vue'
      
      const props = defineProps(['coinId'])
      
      const coin = reactive({
          data: []
      });
      
      async function fetchData() {
        try {
          coin.data = await api.get(`/coins/${props.coinId}`)
              .then((response) =&gt; {
                  return response.data;
              })
        }
        catch (e) {
          console.error(e)
        }
      }
      
      fetchData()
      
      
      &lt;/script&gt;
  </code></pre>
  <p>Hey guys, i'm struggling a lot trying to read data from an api. So, im reading this data from coingecko and when it's just on the first array it works very well. But when its an array inside an array its returns undefined when i try to refresh the page. But while i'm coding and it auto updates, it works very well. How can i treat it and make it so it doesn't show up undefined before anything?</p>
  <p><a href="https://i.stack.imgur.com/aLPVk.png" rel="nofollow noreferrer">Showing up an error</a>
  <a href="https://i.stack.imgur.com/eXS4f.png" rel="nofollow noreferrer">While coding and it just auto refreshes</a></p>