diff --git a/lib/director/browser.js b/lib/director/browser.js index 1e47293..8556100 100644 --- a/lib/director/browser.js +++ b/lib/director/browser.js @@ -222,7 +222,12 @@ Router.prototype.setRoute = function (i, v, val) { url[i] = v; } else if (typeof val === 'string') { - url.splice(i, v, s); + url.splice(i, v, val); + } + else if (typeof i === 'number' && typeof v === 'number') { + if (i < url.length) { + url.splice(i, v); + } } else { url = [i];