Skip to content

Commit

Permalink
Revert "Merge pull request #2 from BitClock/feature"
Browse files Browse the repository at this point in the history
This reverts commit 04591d7, reversing
changes made to 1a3750f.
  • Loading branch information
bernardmcmanus committed Jun 1, 2017
1 parent 04591d7 commit 00a1b0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/weak-set.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { WeakSet } = global;

/**
* IMPORTANT: MockWeakSet intentionally omits unused methods (like delete)
*/
Expand All @@ -13,7 +15,5 @@ function MockWeakSet(mws = []) {
}

export default function MaybeWeakSet(iterable) {
// WeakSet causes a horrible memory leak in node so just use the mock for now
// https://github.com/nodejs/node/issues/6180
return MockWeakSet(iterable);
return WeakSet ? new WeakSet(iterable) : MockWeakSet(iterable);
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bitclock",
"version": "0.2.0-beta.2",
"version": "0.2.0-beta.3",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down

0 comments on commit 00a1b0e

Please sign in to comment.