fix warning about max EventEmitter listeners

This commit is contained in:
Nolan Lawson 2018-04-13 08:38:47 -07:00
parent 1d67a2ad0c
commit b6ca108dd2
1 changed files with 4 additions and 0 deletions

View File

@ -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
}