+7
-0
lines changedFilter options
+7
-0
lines changed Original file line number Diff line number Diff line change
@@ -14,6 +14,13 @@ export function loadData(state, payload) {
14
14
15
15
const {pilots, designs, mechs} = payload;
16
16
17
+
// Clear out any existing models from state so that we can avoid
18
+
// conflicts from the new data coming in if data is reloaded
19
+
[Pilot, Mech, MechDesign].forEach(modelType => {
20
+
modelType.all().withModels.forEach(model => model.delete());
21
+
session.state = session.reduce();
22
+
});
23
+
17
24
// Queue up creation commands for each entry
18
25
pilots.forEach(pilot => Pilot.parse(pilot));
19
26
designs.forEach(design => MechDesign.parse(design));
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4