diff --git a/framework/sdk-parent/frontend/src/utils/custom_field.js b/framework/sdk-parent/frontend/src/utils/custom_field.js index 059b4e37c8..f005afe800 100644 --- a/framework/sdk-parent/frontend/src/utils/custom_field.js +++ b/framework/sdk-parent/frontend/src/utils/custom_field.js @@ -80,7 +80,7 @@ export function parseCustomField(data, template, rules, oldFields) { let customField = data.fields[i]; if (customField.id === item.id) { try { - if (item.type === "textarea" || item.type === "richText") { + if (item.type === "richText") { setDefaultValue(item, "\"" + customField.textValue + "\""); } else { setDefaultValue(item, customField.value); diff --git a/test-track/frontend/src/business/case/components/BaseEditItemComponent.vue b/test-track/frontend/src/business/case/components/BaseEditItemComponent.vue index 8b7a4028da..f9a9362f67 100644 --- a/test-track/frontend/src/business/case/components/BaseEditItemComponent.vue +++ b/test-track/frontend/src/business/case/components/BaseEditItemComponent.vue @@ -294,12 +294,8 @@ export default { } } - if ( - this.contentObject.content.type === "input" || - this.contentObject.content.type === "richText" - ) { - if (this.contentObject.content.defaultValue === "" || - this.contentObject.content.defaultValue == null) { + if (['input', 'richText', 'textarea'].indexOf(this.contentObject.content.type) > -1) { + if (!this.contentObject.content.defaultValue) { this.isCustomNone = true; return this.$t("case.none"); } else { @@ -308,8 +304,7 @@ export default { } } - if (this.contentObject.content.defaultValue === "" || - this.contentObject.content.defaultValue == null) { + if (!this.contentObject.content.defaultValue) { this.isCustomNone = true; return this.$t("case.none"); } else {