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

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

@jfstgermain

Description

@jfstgermain

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions