Commit 23c09347 authored by Ryan Herbert's avatar Ryan Herbert Committed by marc duez

url.js positional params manage extra slashes

Ignore empty slashes. This is mainly so remove the empty positional
parameter that appears when we have a trailing slash on the URL (which
is currently added automatically by NGINX), but will serve as a catchall
for any "empty" slash arguments, much like unix-like distributions
manage filepaths.
parent 693a871b
......@@ -192,7 +192,7 @@ PositionalUrl.prototype.parseUrlParams = function() {
var slash_params = url.pathname.substr(1).split('/');
var positional_params = [];
for (var k = 0; k < slash_params.length; k++) {
if(slash_params[k] !== 'browser')
if(slash_params[k] !== 'browser' && slash_params[k] !== "")
positional_params.push(slash_params[k]);
}
var pos_param_keys = this.getStraightParams();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment