INFRA-132 - js/view/crm.designer.js - Cleanup empty checks to satisfy jshint
authorTim Otten <totten@civicrm.org>
Mon, 5 Jan 2015 21:45:11 +0000 (13:45 -0800)
committerTim Otten <totten@civicrm.org>
Mon, 5 Jan 2015 21:46:28 +0000 (13:46 -0800)
js/view/crm.designer.js

index b6d0ad11f2db7070976b786ad4b532b16de509ce..e62167f89538522aa001fdb86312cfd15be8cd5a 100644 (file)
       }
     },
     toggleAll: function(e) {
-      if ($('.crm-designer-palette-search input').val() == '') {
+      if (_.isEmpty($('.crm-designer-palette-search input').val())) {
         $('.crm-designer-palette-tree').jstree($(e.target).attr('rel'));
       }
       e.preventDefault();
             ufFieldCanvasView.model.getRel('ufFieldCollection'),
             {skipWeights: true}
           );
-          if (null == ufFieldModel) {
+          if (_.isEmpty(ufFieldModel)) {
             ufFieldCanvasView.$('.crm-designer-fields .ui-draggable').remove();
           } else {
             // Move from end to the 'dropped' position