[Pkg-javascript-commits] [sockjs-client] 153/434: #7 cosmetic, code smell

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit cdffefeed25fd646266a6a4ce0f9ee9b6ba40f81
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Sat Sep 17 19:50:45 2011 +0100

    #7 cosmetic, code smell
---
 lib/utils.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/utils.js b/lib/utils.js
index 56e1758..296a131 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -331,7 +331,8 @@ utils.amendUrl = function(url) {
     if (url.indexOf('/') === 0) {
         url = dl.protocol + '//' + dl.host + url;
     }
-    return url.replace(/\/+$/,''); // N.B. strip trailing slashes
+    url = url.replace(/[/]+$/,''); // strip trailing slashes
+    return url;
 };
 
 // IE doesn't support [].indexOf.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list