fixes broken field display/error when new field is dragged
authorkurund <kurund@civicrm.org>
Tue, 21 Jan 2014 20:11:04 +0000 (12:11 -0800)
committerkurund <kurund@civicrm.org>
Tue, 21 Jan 2014 20:11:04 +0000 (12:11 -0800)
js/model/crm.uf.js

index d956c2b79f9bc257f2fb4081849f75753405f9cd..cda2abcb9dd14940138dcc51d87619513cb8d005 100644 (file)
     },
     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'));