Skip to content

Commit e72fc13

Browse files
committed
remove 3rd param of areEventsOverlapped
1 parent e5926e1 commit e72fc13

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Events/Events.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,9 @@ const EVENTS_CONTAINER_WIDTH = CONTAINER_WIDTH - EVENT_HORIZONTAL_PADDING;
2222
const MIN_ITEM_WIDTH = 4;
2323
const ALLOW_OVERLAP_SECONDS = 2;
2424

25-
const areEventsOverlapped = (
26-
event1,
27-
event2,
28-
allowSeconds = ALLOW_OVERLAP_SECONDS,
29-
) => {
25+
const areEventsOverlapped = (event1, event2) => {
3026
const endDate = moment(event1.endDate);
31-
if (allowSeconds && allowSeconds > 0) {
32-
endDate.subtract(allowSeconds, 'seconds');
33-
}
27+
endDate.subtract(ALLOW_OVERLAP_SECONDS, 'seconds');
3428
return endDate.isSameOrAfter(event2.startDate);
3529
};
3630

0 commit comments

Comments
 (0)