From a208e5dedbc53c2e5d460ca075ec15ab06060703 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Fri, 13 Apr 2018 09:46:38 -0700 Subject: [PATCH] fix warning about max EventEmitter listeners (#100) --- routes/_utils/eventBus.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routes/_utils/eventBus.js b/routes/_utils/eventBus.js index a542a31..c848e73 100644 --- a/routes/_utils/eventBus.js +++ b/routes/_utils/eventBus.js @@ -2,6 +2,10 @@ import EventEmitter from 'events' const eventBus = new EventEmitter() +// we need enough 'postedStatus' listeners for each +// visible status in a timeline +eventBus.setMaxListeners(100) + if (process.browser && process.env.NODE_ENV !== 'production') { window.eventBus = eventBus }