Selaa lähdekoodia

fix new peer object

ericz 12 vuotta sitten
vanhempi
commit
bd00afb76f
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      lib/peer.js

+ 1 - 1
lib/peer.js

@@ -6,7 +6,7 @@ function Peer(id, options) {
     options = id;
     id = undefined;
   }
-  if (!(this instanceof Peer)) return new Peer(options);
+  if (!(this instanceof Peer)) return new Peer(id, options);
   EventEmitter.call(this);
 
   options = util.extend({