@woosh/meep-engine 2.47.20 → 2.47.22

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.47.20",
8
+ "version": "2.47.22",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../assert.js";
2
- import { NodeInstance } from "../node/NodeInstance.d.ts";
2
+ import { NodeInstance } from "../node/NodeInstance.js";
3
3
  import { abstractJSONDeserializer } from "../../../json/abstractJSONDeserializer.js";
4
4
  import { NodeRegistry } from "../node/NodeRegistry.js";
5
5
 
@@ -3,6 +3,7 @@ import { PortDirection } from "./PortDirection.js";
3
3
  import { computeHashIntegerArray } from "../../../collection/array/computeHashIntegerArray.js";
4
4
  import { objectKeyByValue } from "../../object/objectKeyByValue.js";
5
5
  import { DataType } from "../DataType.js";
6
+ import { assert } from "../../../assert.js";
6
7
 
7
8
  /**
8
9
  * @type {number}
@@ -96,12 +97,14 @@ export class Port {
96
97
  let _type = dataType !== null ? DataType.fromJSON(dataType) : null;
97
98
 
98
99
  if (registry !== undefined && _type !== null) {
100
+ assert.equal(registry.isNodeRegistry, true, 'registry.isNodeRegistry !== true');
101
+
99
102
  // attempt to re-write data type with one from the registry
100
103
  const match = registry.getTypeById(_type.id);
101
104
 
102
105
  if (match !== undefined) {
103
106
 
104
- if (match.equals(_type)) {
107
+ if (!match.equals(_type)) {
105
108
  throw new Error(`Loaded type ${_type} does not match one in the registry ${match}`)
106
109
  }
107
110