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

Commit c48301b

Browse files
committed
fix(keys): Do not use Symbol which are broken in Chrome 39.0.2171 (Dartium)
1 parent fa18d4c commit c48301b

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

lib/keys.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
/**
22
* Creates keys for `private` properties on exposed objects to minimize interactions with other codebases.
3-
* The key will be a Symbol if the host supports it; otherwise a prefixed string.
43
*/
5-
var create;
64

7-
if (typeof Symbol === 'function') {
8-
create = function (name) {
9-
return Symbol(name);
10-
}
11-
} else {
12-
create = function (name) {
13-
return '_zone$' + name;
14-
}
5+
function create(name) {
6+
// `Symbol` implementation is broken in Chrome 39.0.2171, do not use them even if they are available
7+
return '_zone$' + name;
158
}
169

1710
var commonKeys = {

0 commit comments

Comments
 (0)