From 191a9007dc66074270b0bc6ac998e779825351d7 Mon Sep 17 00:00:00 2001
From: CamilleC <kmille.c.cc@gmail.com>
Date: Thu, 26 Jan 2017 15:58:36 +0100
Subject: [PATCH] fix getEndpoints

---
 www/js/entities/peer.js | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/www/js/entities/peer.js b/www/js/entities/peer.js
index 0db809191..2362ccb71 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){
-- 
GitLab