Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Do not warn about the number of subscribers to renderer store state change events #12909

Merged
merged 1 commit into from
Jan 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions js/stores/appStoreRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ class AppStoreRenderer extends EventEmitter {
constructor () {
super()
this.appState = new Immutable.Map()
// Many components can subscribe to changes in store state
// so ignore any memory-leak warning about having more than 10 listeners.
this.setMaxListeners(0)
}
emitChanges () {
if (lastEmittedState !== this.appState) {
Expand Down
7 changes: 7 additions & 0 deletions js/stores/windowStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ let currentKey = 0
const incrementNextKey = () => ++currentKey

class WindowStore extends EventEmitter {
constructor() {
super()
// Many components can subscribe to changes in store state
// so ignore any memory-leak warning about having more than 10 listeners.
this.setMaxListeners(0)
}

getState () {
return windowState
}
Expand Down