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:
parent
aceb96ec82
commit
19dc2e55c3
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue