@byline/db-postgres 2.2.10 → 2.3.1
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.
|
@@ -33,7 +33,7 @@ export const flattenFieldSetData = (fields, data, locale) => {
|
|
|
33
33
|
* @returns
|
|
34
34
|
*/
|
|
35
35
|
function* flattenFieldSetDataGen(fields, data, locale, parent_path = []) {
|
|
36
|
-
if (data
|
|
36
|
+
if (data == null) {
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
const fieldData = data;
|
|
@@ -51,7 +51,11 @@ function* flattenFieldSetDataGen(fields, data, locale, parent_path = []) {
|
|
|
51
51
|
* @returns
|
|
52
52
|
*/
|
|
53
53
|
function* flattenFieldDataGen(field, data, locale, field_path) {
|
|
54
|
-
|
|
54
|
+
// Treat `null` the same as `undefined` — a removed/cleared field emits no
|
|
55
|
+
// storage rows for the new version, so reads reconstruct as absent. Without
|
|
56
|
+
// this guard, downstream value extractors (relation, file/image, group,
|
|
57
|
+
// localized) dereference `null` and crash.
|
|
58
|
+
if (data == null) {
|
|
55
59
|
return;
|
|
56
60
|
}
|
|
57
61
|
// Group fields are simple -- just use flattenFieldSetDataGen. It will handle
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@byline/db-postgres",
|
|
3
3
|
"private": false,
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.3.1",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.9.0"
|
|
8
8
|
},
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"pg": "^8.21.0",
|
|
58
58
|
"uuid": "^14.0.0",
|
|
59
59
|
"zod": "^4.4.3",
|
|
60
|
-
"@byline/admin": "2.
|
|
61
|
-
"@byline/
|
|
62
|
-
"@byline/
|
|
60
|
+
"@byline/admin": "2.3.1",
|
|
61
|
+
"@byline/auth": "2.3.1",
|
|
62
|
+
"@byline/core": "2.3.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@biomejs/biome": "2.4.15",
|