瀏覽代碼

fix new peer object

ericz 12 年之前
父節點
當前提交
bd00afb76f
共有 1 個文件被更改,包括 1 次插入1 次删除
  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({