Skip to content

Commit

Permalink
fix: revalidating list
Browse files Browse the repository at this point in the history
  • Loading branch information
costafsk committed Jul 21, 2021
1 parent baa468d commit 3b9f226
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/List/List.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<table :id="id" class="sol-table-list">
<table v-if="items.length" :id="id" class="sol-table-list">
<tr v-for="(item, index) in items" :key="index">
<th>{{ item.title }}</th>
<td>{{ item.description }}</td>
Expand Down Expand Up @@ -28,6 +28,7 @@ export default {
required: true,
validator: (obj) => {
if (!(obj && obj.constructor === Array)) return false;
if (obj.length === 0) return true;
const ListProperties = ['title', 'description'].filter(
(property) => !Object.prototype.hasOwnProperty.call(obj[0], property),
);
Expand Down

0 comments on commit 3b9f226

Please sign in to comment.