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.
@@ -22502,8 +22502,17 @@ class FormStore {
22502
22502
 
22503
22503
  // We need fill the list as [] if Form.List is empty
22504
22504
  listNamePaths.forEach(namePath => {
22505
- if (!get(mergedValues, namePath)) {
22506
- mergedValues = set(mergedValues, namePath, []);
22505
+ const listValue = get(mergedValues, namePath);
22506
+
22507
+ // NOTE: `getFieldsValue(['list'])` may not include list root when Form.List isn't wrapped by a parent Field.
22508
+ // In this case we should fallback to store value first, and only fill `[]` when store doesn't have it.
22509
+ if (listValue === undefined) {
22510
+ const storeListValue = get(this.store, namePath);
22511
+ mergedValues = set(
22512
+ mergedValues,
22513
+ namePath,
22514
+ storeListValue === undefined ? [] : storeListValue,
22515
+ );
22507
22516
  }
22508
22517
  });
22509
22518
  return mergedValues;