s2cfgtojson 7.0.23 → 7.0.24

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.
Files changed (2) hide show
  1. package/dist/Struct.mjs +4 -1
  2. package/package.json +1 -1
package/dist/Struct.mjs CHANGED
@@ -93,7 +93,10 @@ export class Struct {
93
93
  this[nextIndex !== undefined ? nextIndex + 1 : 0] = value;
94
94
  }
95
95
  else {
96
- if (value instanceof Struct) {
96
+ if (typeof value === "object") {
97
+ if (!(value instanceof Struct)) {
98
+ value = new Struct(value);
99
+ }
97
100
  value.__internal__.rawName = String(key);
98
101
  }
99
102
  this[key] = value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s2cfgtojson",
3
- "version": "7.0.23",
3
+ "version": "7.0.24",
4
4
  "description": "Converts Stalker 2 Cfg file into POJOs",
5
5
  "keywords": [
6
6
  "stalker",