Commit af7b9f3a authored by Ryan Herbert's avatar Ryan Herbert Committed by Mathieu Giraud

url.js prevent model overwriting of missing params

If a parameter is missing from the url, it shouldn't overwrite a value
that exists in the model.
parent 46c1f1c6
......@@ -100,7 +100,9 @@ Url.prototype= {
applyURL : function() {
var straight_params = this.getStraightParams();
for (var i = 0; i < straight_params.length; i++) {
this.m[straight_params[i]] = this.url_dict[straight_params[i]];
if (typeof this.url_dict[straight_params[i]] !== "undefined") {
this.m[straight_params[i]] = this.url_dict[straight_params[i]];
}
}
if (typeof this.url_dict.clone !== "undefined") {
......
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