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.

makeAddListener breaks when the Event Name is a Symbol #1110

@jreidgreer

Description

@jreidgreer

When Zone.js is running in Node, it appears to be wrapping Node's EventEmitter methods, causing issues when the eventName is a Symbol. Node's documentation states that eventName can be a string or a symbol.

However, Zone tries to coerce eventName into a string:

const falseEventName = eventName + FALSE_STR;

This causes an error:

TypeError: Cannot convert a Symbol value to a string
    at Unpack.<anonymous> (zone.js/dist/zone-node.js:1688:52)
    at new Parser (/gulp-custom-plugin/node_modules/custom-module/node_modules/tar/lib/parse.js:70:12)
    at new <anonymous> (/gulp-custom-plugin/node_modules/custom-module/node_modules/tar/lib/warn-mixin.js:2:26)
    at new Unpack (/gulp-custom-plugin/node_modules/custom-module/node_modules/tar/lib/unpack.js:52:5)
    at extract (/gulp-custom-plugin/node_modules/custom-module/node_modules/tar/lib/extract.js:111:10)
    at Object.module.exports (/gulp-custom-plugin/node_modules/custom-module/node_modules/tar/lib/extract.js:38:7)
    at extractStream (/gulp-custom-plugin/node_modules/custom-module/node_modules/pacote/lib/extract-stream.js:39:1

This is causing an issue in the node-tar library, for instance.

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