瀏覽代碼

fix peek() without cb not returning the object

Herbert Vojčík 10 年之前
父節點
當前提交
2a013b3770
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/usim.js

+ 1 - 1
lib/usim.js

@@ -36,7 +36,7 @@
     };
 
     uSim.prototype.peek = function (cb) {
-        this.peekUntil(Infinity, cb);
+        return this.peekUntil(Infinity, cb);
     };
 
     uSim.prototype.streamUntil = function (limit, cb) {