Skip to content

Commit 61036a6

Browse files
committed
ignore empty confirmation date #33
1 parent 30d2c02 commit 61036a6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

client/components/Availabilities.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default React.createClass({
4242

4343
_.each(this.state.volunteers, volunteer => _.each(volunteer.availabilities, (av) => {
4444
const className = new Date(av.from) <= start && new Date(av.till) >= end
45-
? new Date(av.confirmationTill) >= now ? 'available' : 'expired'
45+
? new Date(av.confirmationTill || now) >= now ? 'available' : 'expired'
4646
: 'unavailable';
4747

4848
items.push({

client/components/VolunteerGroupSelect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default React.createClass({
5454
const end = new Date(mission.end);
5555

5656
const isAvailable = av => (
57-
new Date(av.confirmationTill) >= now &&
57+
new Date(av.confirmationTill || now) >= now &&
5858
new Date(av.from) <= start &&
5959
new Date(av.till) >= end
6060
);

0 commit comments

Comments
 (0)