Adding workaround for GetJSON screwing up profile dictionary.
This commit is contained in:
parent
f6c9768fb8
commit
3973a4cee5
@ -149,7 +149,9 @@
|
||||
}
|
||||
|
||||
function getProfile() {
|
||||
return JSON.parse(localStorage.profile || '{}');
|
||||
var profile = JSON.parse(localStorage.profile || '{}');
|
||||
profile.serial = true;
|
||||
return profile;
|
||||
}
|
||||
|
||||
window.onpopstate = function(state) {
|
||||
|
@ -191,6 +191,7 @@ function computeRecordGeo(records, context) {
|
||||
}
|
||||
|
||||
function computeRecordCompat(records, context, callback) {
|
||||
console.log(context.profile);
|
||||
async.map(
|
||||
records,
|
||||
function(record, callback) {
|
||||
@ -231,7 +232,7 @@ function computeRecordCompat(records, context, callback) {
|
||||
});
|
||||
},
|
||||
function(err, results) {
|
||||
console.log(results);
|
||||
// console.log(results);
|
||||
callback(records);
|
||||
}
|
||||
);
|
||||
@ -255,11 +256,11 @@ function sanitizeQuery(query) {
|
||||
|
||||
query.features = features;
|
||||
|
||||
for (var category in query.profile) {
|
||||
if (parseFloat(query.profile[category]) === 0) {
|
||||
delete query.profile[category];
|
||||
}
|
||||
}
|
||||
// for (var category in query.profile) {
|
||||
// if (parseFloat(query.profile[category]) === 0) {
|
||||
// delete query.profile[category];
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
function getCategories(callback) {
|
||||
|
Loading…
Reference in New Issue
Block a user