Skip to content

Symbol shim is created as an object but should be a function #988

@wkwiatek

Description

@wkwiatek

Hey,

I had an issue with zone.js regarding checking whether Symbol exists in the browser or not and it turned out that RxJS is initializing Symbol as an object (the real implementation resolves it as a function). This incompatibility may affect other libraries which relies on symbols (what happens with zone.js).

In the library code it's probably following line responsible for that: https://github.com/ReactiveX/RxJS/blob/master/src/util/SymbolShim.ts#L12

Here is a plunker to see the problem:
http://plnkr.co/edit/hpvSjZDERVJHiLrgLd23

And the output from browser which doesn't support symbols is as follows (Win 7 / IE 11 - BrowserStack):
bs_win7_ie_11 0 1

Metadata

Metadata

Assignees

Labels

bugConfirmed bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions