Skip to content

Commit

Permalink
pkp/pkp-lib#4312 Fix never assigned label null/zero ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Nov 17, 2023
1 parent 2eb0c60 commit 654bf80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/ListPanel/users/SelectReviewerListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ export default {
/**
* How many days has it been since they were last assigned a review
*
* @return {Number}
* @return {?Number}
*/
daysSinceLastAssignment() {
if (!this.item.dateLastReviewAssignment) {
return 0;
return null;
}
// Needed for Safari as it will return NaN for date strings with '-' separators.
Expand All @@ -334,7 +334,7 @@ export default {
* @return {String} "X days ago"
*/
daysSinceLastAssignmentLabelCompiled() {
if (!this.daysSinceLastAssignment) {
if (this.daysSinceLastAssignment === null) {
return this.neverAssignedLabel;
}
if (this.daysSinceLastAssignment > 1) {
Expand Down

0 comments on commit 654bf80

Please sign in to comment.