Skip to content

Commit

Permalink
slight fix
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Mar 28, 2024
1 parent 42ecab1 commit adc0183
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/assets/javascripts/factories/ScorerFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
self.owned = data.owned;
self.ownerId = data.owner_id;
self.ownerName = data.owner_name;

self.scorerId = data.scorer_id;
self.communal = data.communal;

self.teams = data.teams || [];

// Functions
Expand Down Expand Up @@ -591,6 +591,16 @@
undefined,
options
).then(function(calcScore){
//window.alert('query ' + query.queryText + ' socre:' + calcScore);
// Set to ZSR if there are no docs
if (calcScore === null){
if (docs.length === 0) {
return 'zsr';
}
if (bestDocs.length === 0) {
return '--';
}
}
if (angular.isNumber(calcScore)) {
if (calcScore < 0 && calcScore === maxScore) {
return null;
Expand Down

0 comments on commit adc0183

Please sign in to comment.