Skip to content

Commit

Permalink
Check for length > 0 rather than !! length
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmiller committed Apr 27, 2017
1 parent c11b559 commit 3645bdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elcid/assets/js/elcid/controllers/clinical_advice_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ angular.module('opal.controllers').controller(

this.watchMicroFields = function(mi){
// apart from the keys when, _client, initials, are any of the fields not falsy, ie undeinfed
self.changed = !!_.compact(_.filter(mi, function(val, key){
self.changed = _.compact(_.filter(mi, function(val, key){
return !(key == 'when' || key == '_client' || key == "initials");
})).length;
})).length > 0;
};

$q.all([Referencedata, recordLoader]).then(function(datasets){
Expand Down

0 comments on commit 3645bdc

Please sign in to comment.