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

Commit d44d699

Browse files
committedOct 23, 2015
fix(keys): do not declare functions inside blocks
fixes #194
1 parent 22dce10 commit d44d699

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎lib/keys.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
* Creates keys for `private` properties on exposed objects to minimize interactions with other codebases.
33
* The key will be a Symbol if the host supports it; otherwise a prefixed string.
44
*/
5+
var create;
6+
57
if (typeof Symbol !== 'undefined') {
6-
function create(name) {
8+
create = function (name) {
79
return Symbol(name);
8-
}
10+
}
911
} else {
10-
function create(name) {
12+
create = function (name) {
1113
return '_zone$' + name;
1214
}
1315
}
@@ -20,4 +22,4 @@ var commonKeys = {
2022
module.exports = {
2123
create: create,
2224
common: commonKeys
23-
};
25+
};

0 commit comments

Comments
 (0)
This repository has been archived.