@remoteoss/json-schema-form 0.12.3-beta.0 → 0.12.4-beta.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ #### 0.12.4-beta.0 (2026-06-23)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **v0:** validation was crashing when a conditional reaches into a undefined fieldset value ([#261](https://github.com/remoteoss/json-schema-form/pull/261)) ([0d0041ca](https://github.com/remoteoss/json-schema-form/commit/0d0041cab5983f1159c2eb3461b81a96490af8e9))
6
+
1
7
  #### 0.12.3-beta.0 (2026-01-21)
2
8
 
3
9
  ##### Chores
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2026 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.12.3-beta.0
5
- Generated: Wed, 21 Jan 2026 21:38:57 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.12.4-beta.0
5
+ Generated: Tue, 23 Jun 2026 02:22:33 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -133,7 +133,9 @@ function checkIfConditionMatchesProperties(node, formValues, formFields, logic)
133
133
  if (currentProperty.properties) {
134
134
  return checkIfConditionMatchesProperties(
135
135
  { if: currentProperty },
136
- formValues[name],
136
+ // A required fieldset can still be null/undefined
137
+ // Treat it as {} so the nested condition evaluates instead of crashing on a null property access.
138
+ formValues[name] ?? {},
137
139
  getField(name, formFields).fields,
138
140
  logic
139
141
  );
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2026 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.12.3-beta.0
5
- Generated: Wed, 21 Jan 2026 21:38:57 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.12.4-beta.0
5
+ Generated: Tue, 23 Jun 2026 02:22:33 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -95,7 +95,9 @@ function checkIfConditionMatchesProperties(node, formValues, formFields, logic)
95
95
  if (currentProperty.properties) {
96
96
  return checkIfConditionMatchesProperties(
97
97
  { if: currentProperty },
98
- formValues[name],
98
+ // A required fieldset can still be null/undefined
99
+ // Treat it as {} so the nested condition evaluates instead of crashing on a null property access.
100
+ formValues[name] ?? {},
99
101
  getField(name, formFields).fields,
100
102
  logic
101
103
  );
@@ -1,8 +1,8 @@
1
1
 
2
2
  /*!
3
3
  Copyright (c) 2026 Remote Technology, Inc.
4
- NPM Package: @remoteoss/json-schema-form@0.12.3-beta.0
5
- Generated: Wed, 21 Jan 2026 21:38:57 GMT
4
+ NPM Package: @remoteoss/json-schema-form@0.12.4-beta.0
5
+ Generated: Tue, 23 Jun 2026 02:22:33 GMT
6
6
 
7
7
  MIT License
8
8
 
@@ -11612,7 +11612,9 @@ function checkIfConditionMatchesProperties(node, formValues, formFields, logic)
11612
11612
  if (currentProperty.properties) {
11613
11613
  return checkIfConditionMatchesProperties(
11614
11614
  { if: currentProperty },
11615
- formValues[name],
11615
+ // A required fieldset can still be null/undefined
11616
+ // Treat it as {} so the nested condition evaluates instead of crashing on a null property access.
11617
+ formValues[name] ?? {},
11616
11618
  getField(name, formFields).fields,
11617
11619
  logic
11618
11620
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/json-schema-form",
3
- "version": "0.12.3-beta.0",
3
+ "version": "0.12.4-beta.0",
4
4
  "description": "Headless UI form powered by JSON Schemas",
5
5
  "author": "Remote.com <engineering@remote.com> (https://remote.com/)",
6
6
  "license": "MIT",
@@ -62,4 +62,19 @@ describe('checkIfConditionMatchesProperties()', () => {
62
62
  )
63
63
  ).toBe(false);
64
64
  });
65
+
66
+ it('Nested required fieldset that is null does not crash', () => {
67
+ expect(
68
+ checkIfConditionMatchesProperties(
69
+ {
70
+ if: {
71
+ properties: { parent: { properties: { child: { const: 'hello from child' } } } },
72
+ required: ['parent'],
73
+ },
74
+ },
75
+ { parent: null },
76
+ [{ name: 'parent', fields: [] }]
77
+ )
78
+ ).toBe(true);
79
+ });
65
80
  });