Browse Source

Refactoring non-JS like code

master
GabrielTrettel 4 years ago
parent
commit
f225d6857e
  1. 16
      src/app/hooks/selectFromDB.js

16
src/app/hooks/selectFromDB.js

@ -27,18 +27,18 @@ var displacement = 0;
var ID = 0;
var fetched_data = new Map([
["pluv", new Set()],
["flood", new Set()],
["rain", new Set()],
["river", new Set()],
]);
var fetched_data = {
pluv: new Set(),
flood: new Set(),
rain: new Set(),
river: new Set(),
};
function is_valid(id, category) {
if (fetched_data.get(category).has(id)) {
if (fetched_data[category].has(id)) {
return false;
} else {
fetched_data.get(category).add(id);
fetched_data[category].add(id);
}
return true;
}

Loading…
Cancel
Save