@legendapp/state 3.0.0-beta.20 → 3.0.0-beta.21
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/package.json +1 -1
- package/sync-plugins/crud.js +1 -1
- package/sync-plugins/crud.mjs +1 -1
package/package.json
CHANGED
package/sync-plugins/crud.js
CHANGED
|
@@ -198,7 +198,7 @@ function syncedCrud(props) {
|
|
|
198
198
|
if (value) {
|
|
199
199
|
let id = value == null ? void 0 : value[fieldId];
|
|
200
200
|
let isCreate = fieldCreatedAt ? !value[fieldCreatedAt] : !prevAtPath;
|
|
201
|
-
if (
|
|
201
|
+
if (state.isNullOrUndefined(id) && generateId) {
|
|
202
202
|
id = ensureId(value, fieldId, generateId);
|
|
203
203
|
}
|
|
204
204
|
if (!state.isNullOrUndefined(id)) {
|
package/sync-plugins/crud.mjs
CHANGED
|
@@ -196,7 +196,7 @@ function syncedCrud(props) {
|
|
|
196
196
|
if (value) {
|
|
197
197
|
let id = value == null ? void 0 : value[fieldId];
|
|
198
198
|
let isCreate = fieldCreatedAt ? !value[fieldCreatedAt] : !prevAtPath;
|
|
199
|
-
if (
|
|
199
|
+
if (isNullOrUndefined(id) && generateId) {
|
|
200
200
|
id = ensureId(value, fieldId, generateId);
|
|
201
201
|
}
|
|
202
202
|
if (!isNullOrUndefined(id)) {
|