xshell 1.3.19 → 1.3.20

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.
@@ -19526,8 +19526,17 @@ class FormStore {
19526
19526
 
19527
19527
  // We need fill the list as [] if Form.List is empty
19528
19528
  listNamePaths.forEach(namePath => {
19529
- if (!(0,_utils_valueUtil__WEBPACK_IMPORTED_MODULE_8__.getValue)(mergedValues, namePath)) {
19530
- mergedValues = (0,_utils_valueUtil__WEBPACK_IMPORTED_MODULE_8__.setValue)(mergedValues, namePath, []);
19529
+ const listValue = (0,_utils_valueUtil__WEBPACK_IMPORTED_MODULE_8__.getValue)(mergedValues, namePath);
19530
+
19531
+ // NOTE: `getFieldsValue(['list'])` may not include list root when Form.List isn't wrapped by a parent Field.
19532
+ // In this case we should fallback to store value first, and only fill `[]` when store doesn't have it.
19533
+ if (listValue === undefined) {
19534
+ const storeListValue = (0,_utils_valueUtil__WEBPACK_IMPORTED_MODULE_8__.getValue)(this.store, namePath);
19535
+ mergedValues = (0,_utils_valueUtil__WEBPACK_IMPORTED_MODULE_8__.setValue)(
19536
+ mergedValues,
19537
+ namePath,
19538
+ storeListValue === undefined ? [] : storeListValue,
19539
+ );
19531
19540
  }
19532
19541
  });
19533
19542
  return mergedValues;