From: kurund Date: Tue, 21 Jan 2014 20:11:04 +0000 (-0800) Subject: fixes broken field display/error when new field is dragged X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c1358f4e2df01fd5db1f2847cb3407030eae15b4;p=civicrm-core.git fixes broken field display/error when new field is dragged --- diff --git a/js/model/crm.uf.js b/js/model/crm.uf.js index d956c2b79f..cda2abcb9d 100644 --- a/js/model/crm.uf.js +++ b/js/model/crm.uf.js @@ -210,7 +210,12 @@ }, isInSelectorAllowed: function() { var visibility = _.first(_.where(VISIBILITY, {val: this.get('visibility')})); - return visibility.isInSelectorAllowed; + if (visibility) { + return visibility.isInSelectorAllowed; + } + else { + return false; + } }, getFieldSchema: function() { return this.getRel('ufGroupModel').getFieldSchema(this.get('entity_name'), this.get('field_name'));