From b8e26b02267b6d9f5deca44dd941ca2f3237230f Mon Sep 17 00:00:00 2001 From: Ricardo Raphael Date: Tue, 18 Dec 2018 22:14:47 +0800 Subject: [PATCH] fix: duplicate events (#1159) Fixes https://github.com/intljusticemission/react-big-calendar/issues/1155 --- src/utils/Resources.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/Resources.js b/src/utils/Resources.js index 17d541459..b825ef993 100644 --- a/src/utils/Resources.js +++ b/src/utils/Resources.js @@ -15,8 +15,9 @@ export default function Resources(resources, accessors) { if (!resources) { // Return all events if resources are not provided eventsByResource.set(NONE, events) + return eventsByResource } - + events.forEach(event => { const id = accessors.resource(event) || NONE let resourceEvents = eventsByResource.get(id) || []