mirror of
https://github.com/discourse/discourse.git
synced 2025-06-20 20:21:34 +08:00
FIX: Warnings in Qunit suite
This commit is contained in:
@ -12,10 +12,9 @@ function finderFor(filter, params) {
|
||||
var url = Discourse.getURL("/") + filter + ".json";
|
||||
|
||||
if (params) {
|
||||
var keys = Object.keys(params);
|
||||
var keys = Object.keys(params),
|
||||
encoded = [];
|
||||
|
||||
if (keys.length > 0) {
|
||||
var encoded = [];
|
||||
keys.forEach(function(p) {
|
||||
var value = params[p];
|
||||
if (typeof value !== 'undefined') {
|
||||
@ -23,6 +22,7 @@ function finderFor(filter, params) {
|
||||
}
|
||||
});
|
||||
|
||||
if (encoded.length > 0) {
|
||||
url += "?" + encoded.join('&');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user