@vived/host 3.9.2 → 3.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,20 @@ class SavePersistentStatesUCImp extends SavePersistentStatesUC {
20
20
  this.saveLocally = () => {
21
21
  if (!this.stateMachine)
22
22
  return;
23
- const states = this.stateMachine.states;
23
+ const states = [];
24
+ this.stateMachine.states.forEach((stateID) => {
25
+ var _a;
26
+ const state = (_a = this.stateMachine) === null || _a === void 0 ? void 0 : _a.getStateByID(stateID);
27
+ if (state) {
28
+ const rVal = {
29
+ assets: state.assets,
30
+ data: state.stateData,
31
+ id: state.id,
32
+ name: state.name
33
+ };
34
+ states.push(rVal);
35
+ }
36
+ });
24
37
  const statesData = JSON.stringify(states);
25
38
  const a = document.createElement("a");
26
39
  const file = new Blob([statesData], { type: "text/plain" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vived/host",
3
- "version": "3.9.2",
3
+ "version": "3.9.3",
4
4
  "description": "Public Host package for the VIVED Learning App system",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",