Commit 163d16b6 authored by Ryan Herbert's avatar Ryan Herbert Committed by marc duez

url.js prevent empty string param

This issue was causing a parameter with with and empty string for key
and undefined for value due to the fact that splitting on an empty
url.search yielded an array containing an empty string.
parent c6ee86bc
......@@ -109,7 +109,10 @@ Url.prototype= {
parseUrlParams:function () {
params={}
var url = window.location;
var url_param = url.search.substr(1).split("&");
var url_param = [];
if (url.search.length > 0) {
url.search.substr(1).split("&");
}
for (var i = 0; i < url_param.length; i++) {
var tmparr = url_param[i].split("=");
var p = params[tmparr[0]];
......
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