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