Skip to content

Commit

Permalink
Fixes #259
Browse files Browse the repository at this point in the history
  • Loading branch information
petkaantonov committed Jul 14, 2014
1 parent 44f37e8 commit c7d2d69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/call_get.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
"use strict";
var cr = Object.create;
var callerCache = cr && cr(null);
var getterCache = cr && cr(null);
callerCache[" size"] = getterCache[" size"] = 0;
if (cr) {
var callerCache = cr(null);
var getterCache = cr(null);
callerCache[" size"] = getterCache[" size"] = 0;
}

module.exports = function(Promise) {
var util = require("./util.js");
var canEvaluate = util.canEvaluate;
Expand Down
2 changes: 1 addition & 1 deletion test/mocha/using.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe("Promise.using", function() {
var b = connectError();
using(b, a, function(a, b) {
assert(false);
}).catch(function() {
}).caught(function() {
assert(promise.value().isClosed);
assert.equal(promise.value().closesCalled, 1);
done();
Expand Down

0 comments on commit c7d2d69

Please sign in to comment.