diff --git a/www/js/entities/peer.js b/www/js/entities/peer.js
index 0db809191f13195b77677851c6fa7564f75f51f5..2362ccb714a1a7fea44b36f313a6df50b429d4b9 100644
--- a/www/js/entities/peer.js
+++ b/www/js/entities/peer.js
@@ -59,16 +59,9 @@ function Peer(json) {
 
   that.getEndpoints = function(regex) {
     if (!regex) return that.endpoints;
-    // Use string regex
-    if (typeof regex === "string") {
       return that.endpoints.reduce(function(res, ep){
         return ep.match(regex) ?  res.concat(ep) : res;
       }, []);
-    }
-    // use Regex object
-    return that.endpoints.reduce(function(res, ep){
-      return regex.test(regex) ? res.concat(ep) : res;
-    }, []);
   };
 
   that.hasEndpoint = function(endpoint){