Permalink
Browse files

for to make weakrefs work with .listen

  • Loading branch information...
1 parent c686f66 commit ef2e0e507c6cb8013d19266d9cbd96af68d6c54d @substack committed Jun 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
View
@@ -27,7 +27,7 @@ function D (cons, opts) {
opts.proto = {};
opts.proto.wrap = function (cb, id) {
return weak(cb, function () {
- self.proto.cull(id);
+ if (self.proto) self.proto.cull(id);
});
};
opts.proto.unwrap = function (ref, id) {

0 comments on commit ef2e0e5

Please sign in to comment.