From 6221bf2f159272d5bc588077b927fcdad198fc87 Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Fri, 31 Aug 2018 10:12:26 +0000 Subject: [PATCH] web_form_class: using value instead of get_value --- frappe/website/js/web_form_class.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/website/js/web_form_class.js b/frappe/website/js/web_form_class.js index 8c1c80cd84..e9ee2db2fa 100644 --- a/frappe/website/js/web_form_class.js +++ b/frappe/website/js/web_form_class.js @@ -78,7 +78,8 @@ export default class WebForm { setTimeout(() => { this.field_group.fields_list.forEach((field_instance) => { - if (field_instance.df.fieldtype === "Attach" && field_instance.get_value().match(".(?:jpg|gif|jpeg|png)") ){ + let instance_value = field_instance.value; + if (instance_value != null && field_instance.df.fieldtype === "Attach" && instance_value.match(".(?:jpg|gif|jpeg|png)") ){ field_instance.$input_wrapper.append(``); } });