Files
optolith-client/js/utils/calcEL.js
T
Lukas Obermann 7c229853e7 Updated babel, fixing data flow in ListStore
Transferring all Actions to ListStore to regain unidirectional data flow for all stores. Other Stores only will store section-specific data e.g. filters.
2016-11-02 02:23:02 +01:00

17 lines
285 B
JavaScript

import ELStore from '../stores/ELStore';
export default ap => {
const els = ELStore.getAll();
let ids = [];
let tiers = [];
for (let id in els) {
ids.push(id);
tiers.push(els[id].ap);
}
for (let i = 0; i < tiers.length; i++) {
if (ap <= tiers[i])
return ids[i];
}
};