resolving no value issue.

pull/150/head
iozeey 2 years ago
parent 0f1dc7b5e1
commit e57a8d2d06

@ -614,7 +614,7 @@ export default {
this.save()
},
removeField () {
const templateValue = this.template.values[this.field.uuid]
const templateValue = this.template?.values?.[this.field.uuid]
switch (this.field.type) {
case 'my_signature':
this.showMySignature = false

@ -594,9 +594,9 @@ export default {
}
},
removeArea (area) {
const field = this.template.fields.find((f) => f.areas?.includes(area))
if (['my_text', 'my_signature', 'my_initials', 'my_date'].includes(field.type)) {
const valuesArray = Object.values(this.template.values)
const field = this.template.fields?.find((f) => f.areas?.includes(area))
if (['my_text', 'my_signature', 'my_initials', 'my_date'].includes(field.type) && this.template?.values) {
const valuesArray = Object.values(this.template?.values)
const valueIndex = valuesArray.findIndex((value) => value === this.template.values[field.uuid])
valuesArray.splice(valueIndex, 1)
const valueKey = Object.keys(this.template.values)[valueIndex]

Loading…
Cancel
Save