@typeberry/convert 0.5.4-472e282 → 0.5.4-61ca416

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/index.js CHANGED
@@ -10810,6 +10810,9 @@ var json;
10810
10810
  if (typeof inJson !== "object" || inJson === null) {
10811
10811
  throw new Error("Expected map for parsing");
10812
10812
  }
10813
+ if (Array.isArray(inJson)) {
10814
+ throw new Error("Expected map, got array");
10815
+ }
10813
10816
  const result = new Map();
10814
10817
  for (const [key, value] of Object.entries(inJson)) {
10815
10818
  result.set(parse_parseFromJson(key, K, `${context}.key`), parse_parseFromJson(value, V, `${context}.value`));