From 2c136aee5e746579d50829395fe3f26a749fa5e1 Mon Sep 17 00:00:00 2001 From: Minha Date: Wed, 23 Oct 2024 12:02:36 -0400 Subject: [PATCH] Refactor using underscore.js --- .../apps/cloudcare/static/cloudcare/js/form_entry/form_ui.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/form_ui.js b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/form_ui.js index 11ea8daf1c78..f56878277474 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/form_ui.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/form_ui.js @@ -705,8 +705,7 @@ hqDefine("cloudcare/js/form_entry/form_ui", [ } } }; - if (Object.prototype.hasOwnProperty.call(element, 'binding') && - Object.prototype.hasOwnProperty.call(element, 'ix') && allChildren && allChildren.length > 0) { + if (_.has(element, 'binding') && _.has(element, 'ix') && !_.isEmpty(allChildren)) { findChildAndSetFilename(allChildren); }