瀏覽代碼

Remove extra return

Michelle Bu 11 年之前
父節點
當前提交
8c4f5cb12a
共有 3 個文件被更改,包括 2 次插入4 次删除
  1. 0 1
      dist/peer.js
  2. 2 2
      examples/chat.html
  3. 0 1
      lib/peer.js

+ 0 - 1
dist/peer.js

@@ -1800,7 +1800,6 @@ Peer.prototype.listAllPeers = function(cb) {
       }
       throw new Error('It doesn\'t look like you have permission to list peers IDs. ' + helpfulError);
       cb([]);
-      return;
     } else if (http.status !== 200) {
       cb([]);
     } else {

+ 2 - 2
examples/chat.html

@@ -8,14 +8,14 @@
 <link href="fancy.css" rel="stylesheet" type="text/css">
 
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
-<script type="text/javascript" src="http://cdn.peerjs.com/0.3/peer.min.js"></script>
+<script type="text/javascript" src="../dist/peer.min.js"></script>
 <script>
 // Connect to PeerJS, have server assign an ID instead of providing one
 // Showing off some of the configs available with PeerJS :).
 var peer = new Peer({
   // Set API key for cloud server (you don't need this if you're running your
   // own.
-  key: 'lwjd5qra8257b9',
+  key: 'x7fwx2kavpy6tj4i',
 
   // Set highest debug level (log everything!).
   debug: 3,

+ 0 - 1
lib/peer.js

@@ -432,7 +432,6 @@ Peer.prototype.listAllPeers = function(cb) {
       }
       throw new Error('It doesn\'t look like you have permission to list peers IDs. ' + helpfulError);
       cb([]);
-      return;
     } else if (http.status !== 200) {
       cb([]);
     } else {