1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

Discard unrequested data

This commit is contained in:
Markus Grigull 2017-07-13 11:46:48 +02:00
parent aceb96ec82
commit 19dc2e55c3

View file

@ -54,6 +54,11 @@ class SimulationDataStore extends ReduceStore {
return state;
case 'simulatorData/data-changed':
// check if data is required, otherwise discard
if (state[action.node._id] == null || state[action.data.id] == null) {
return state;
}
// only add data, if newer than current
if (state[action.node._id][action.data.id].sequence < action.data.sequence) {
// add data to simulator