1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-12 10:16:16 +01:00

fix warning about max EventEmitter listeners (#100)

This commit is contained in:
Nolan Lawson 2018-04-13 09:46:38 -07:00 committed by GitHub
parent 1d67a2ad0c
commit a208e5dedb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,10 @@ import EventEmitter from 'events'
const eventBus = new EventEmitter() 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') { if (process.browser && process.env.NODE_ENV !== 'production') {
window.eventBus = eventBus window.eventBus = eventBus
} }