Skip to content

Commit a753045

Browse files
committed
fixed updateIssue when param q is null
1 parent cec0e20 commit a753045

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

webcompat/static/js/lib/issue-list.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,13 +487,22 @@ issueList.IssueView = Backbone.View.extend(
487487
this.issues.setURLState("/api/issues/search", paramsCopy);
488488
}
489489
} else if (_.contains(issuesAPICategories, category)) {
490-
this.issues.setURLState("/api/issues/category/" + category, params);
490+
this.issues.setURLState(
491+
"/api/issues/category/" + category,
492+
this.removeParamQuery(params)
493+
);
491494
} else {
492-
this.issues.setURLState("/api/issues", params);
495+
this.issues.setURLState("/api/issues", this.removeParamQuery(params));
493496
}
494497

495498
this.fetchAndRenderIssues();
496499
},
500+
removeParamQuery: function(params) {
501+
if (params && params.q) {
502+
delete params.q;
503+
}
504+
return params;
505+
},
497506
addParamsToModel: function(paramsArray) {
498507
// this method just puts the params in the model's params property.
499508
// paramsArray is an array of param 'key=value' string pairs

0 commit comments

Comments
 (0)