mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
FIX: Warnings in Qunit suite
This commit is contained in:
parent
bda5a72c6a
commit
9cbfd8362d
1 changed files with 9 additions and 9 deletions
|
@ -12,17 +12,17 @@ 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') {
|
||||
encoded.push(p + "=" + value);
|
||||
}
|
||||
});
|
||||
keys.forEach(function(p) {
|
||||
var value = params[p];
|
||||
if (typeof value !== 'undefined') {
|
||||
encoded.push(p + "=" + value);
|
||||
}
|
||||
});
|
||||
|
||||
if (encoded.length > 0) {
|
||||
url += "?" + encoded.join('&');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue