Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Patched removeAllListeners() doesn't seem to return the EventEmitter instance #1021

Closed
jfstgermain opened this issue Feb 14, 2018 · 1 comment · Fixed by #1022
Closed

Patched removeAllListeners() doesn't seem to return the EventEmitter instance #1021

jfstgermain opened this issue Feb 14, 2018 · 1 comment · Fixed by #1022

Comments

@jfstgermain
Copy link

jfstgermain commented Feb 14, 2018

Hello, I'm using zone.js in an node app and a module chains calls to removeAllListeners(). The patched version of removeAllListeners() doesn't seem to return the EventEmitter.
The following code breaks:

socket.removeAllListeners('error')
  .removeAllListeners('connect')
  .removeAllListeners('secureConnect');

Here's my zone.js setup code:

const Bluebird = require('bluebird');
require('zone.js/dist/zone-node');
require('zone.js/dist/zone-bluebird');

Zone[Zone.__symbol__('bluebird')](Bluebird);

delete global.Promise;

global.Promise = Bluebird;

Am I missing something?

@JiaLiPassion
Copy link
Collaborator

Thank you for posting the issue, I will check it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants