@backmatter/core 0.0.30 → 0.0.31

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/package.json +1 -1
  2. package/src/model.ts +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backmatter/core",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "description": "Experimental Backmatter SDK. APIs will break. Not ready for production.",
5
5
  "type": "module",
6
6
  "publishConfig": {
package/src/model.ts CHANGED
@@ -281,9 +281,11 @@ function migrateLegacySchemaInput(input: unknown): unknown {
281
281
  if (model.fields && typeof model.fields === "object" && !Array.isArray(model.fields)) {
282
282
  const fields = { ...(model.fields as Record<string, unknown>) };
283
283
  for (const [key, snap] of Object.entries(fields)) {
284
- if (snap && typeof snap === "object" && (snap as FieldSnapshot).kind === "locale") {
285
- delete fields[key];
286
- }
284
+ const kind =
285
+ snap && typeof snap === "object"
286
+ ? (snap as { kind?: string }).kind
287
+ : undefined;
288
+ if (kind === "locale") delete fields[key];
287
289
  }
288
290
  next.fields = fields;
289
291
  }