Spiral
2 weeks ago
221
8
Vue

[Vue warn]: Error in render: "TypeError: Cannot read property 'length' of undefined"

Posted 2 weeks ago by Spiral
<table class="table table-bordered table-hover">
  <thead>
    <tr>
       <th>Title</th>
    </tr>
  </thead>
  <tbody>
    <tr v-for="(product,key) in products.data">
      <td>{{ product.title }}</td>
    </tr>
    <tr class="text-center" v-if="products.data.length <= 0">
      <td colspan="12">No data found</td>
    </tr>
  </tbody>
</table>

Please sign in or create an account to participate in this conversation.