Fixing more issues
This commit is contained in:
parent
7ba02e6fdc
commit
076baa1204
@ -257,13 +257,15 @@ function sanitizeQuery(query) {
|
|||||||
_.each(keys, function(key) {
|
_.each(keys, function(key) {
|
||||||
features[key] = _.has(query.features, key) ? query.features[key] : 0;
|
features[key] = _.has(query.features, key) ? query.features[key] : 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
query.features = features;
|
query.features = features;
|
||||||
|
|
||||||
query.profile = _.reject(
|
var profile = {};
|
||||||
query.profile,
|
_.each(JSON.parse(query.profile), function(key, value) {
|
||||||
function(num) { return num === 0; }
|
if (parseFloat(value) !== 0) {
|
||||||
);
|
profile[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
query.profile = profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCategories(callback) {
|
function getCategories(callback) {
|
||||||
|
Loading…
Reference in New Issue
Block a user