diff --git a/lib/channels/src/index.js b/lib/channels/src/index.js index fd7a3c9ae1fb..defa6aff9c5c 100644 --- a/lib/channels/src/index.js +++ b/lib/channels/src/index.js @@ -72,7 +72,7 @@ export default class Channel { _handleEvent(event) { const listeners = this._listeners[event.type]; - if (event.from !== this._sender && listeners) { + if (listeners) { listeners.forEach(fn => fn(...event.args)); } } diff --git a/lib/channels/src/index.test.js b/lib/channels/src/index.test.js index 987edb2f6829..5f7e37354754 100644 --- a/lib/channels/src/index.test.js +++ b/lib/channels/src/index.test.js @@ -177,12 +177,12 @@ describe('Channel', () => { }); describe('_miscellaneous', () => { - it('should ignore if event came from itself', () => { + it('should not ignore if event came from itself', () => { const received = []; channel.on('type-1', n => received.push(n)); channel._handleEvent({ type: 'type-1', args: [11] }); channel._handleEvent({ type: 'type-1', args: [12], from: channel._sender }); - expect(received).toEqual([11]); + expect(received).toEqual([11, 12]); }); }); });