This commit is contained in:
2021-04-09 22:49:39 +00:00
parent 8b474278ee
commit 5cacc87493
2 changed files with 8 additions and 18 deletions

View File

@@ -170,7 +170,7 @@ export default {
},
setDefaultView: function() {
//if only one record left then display it otherwise just let the datatable show what the user can click on
if (this.value.items.length == 1) {
if (this.value && this.value.items && this.value.items.length == 1) {
this.selectedRow = [{ index: 0 }];
this.activeItemIndex = 0;
} else {
@@ -307,7 +307,7 @@ and it's probably not a big list to fill anyway
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value.items.length > 1;
return this.value && this.value.items && this.value.items.length > 1;
},
canAdd: function() {
return (