@woosh/meep-engine 2.56.0 → 2.56.1

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.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.56.0",
8
+ "version": "2.56.1",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -155,6 +155,16 @@ export class OptionGroup extends OptionAbstract {
155
155
 
156
156
  return p
157
157
  .then((loaded) => {
158
+ if (loaded === undefined) {
159
+ // no loaded data, assume options are loaded for hte first time
160
+ return;
161
+ }
162
+
163
+ if (typeof loaded !== "string") {
164
+ console.error(`expected loaded options to be a string, instead was '${typeof loaded}'`);
165
+ return;
166
+ }
167
+
158
168
  group.fromJSON(JSON.parse(loaded));
159
169
  })
160
170
  .finally(() => {