diff options
author | fab <fabrice.leal.ch@gmail.com> | 2019-01-09 22:21:14 +0000 |
---|---|---|
committer | fab <fabrice.leal.ch@gmail.com> | 2019-01-09 22:21:14 +0000 |
commit | b4d31722f1ee192d91717e40a3c1bed281ed9392 (patch) | |
tree | 0645374aa99145475190bc873584d0031c7d731a /lib/js | |
parent | dc18fc34c6fd6a13d15597b5e9f95e57d8eb7fea (diff) |
fix unit tests. implement urlifyChar
Diffstat (limited to 'lib/js')
-rw-r--r-- | lib/js/urweb.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 2a621a2d..6b493c4f 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -2498,9 +2498,9 @@ function sub(s, i) { return ch; } function suf(s, i) { - var offset = s.length; + var off = s.length; iterateString(s, function(_, idx, sidx) { if (idx == i) { off = sidx; return false; } }); - return s.substring(offset); + return s.substring(off); } function slen(s) { var len = 0; |