@iamnnort/nestjs-serializer 2.1.1 → 2.1.2

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/dist/index.js CHANGED
@@ -9136,6 +9136,9 @@ var SerializerService = class {
9136
9136
  }));
9137
9137
  const fieldCountMap = serializerFieldConfigs.reduce((fieldCountMap2, fieldConfig) => {
9138
9138
  const fieldName = fieldConfig.fieldName || fieldConfig.name;
9139
+ if (!fieldName.includes(".")) {
9140
+ return fieldCountMap2;
9141
+ }
9139
9142
  const rootFieldName = fieldName.split(".")[0];
9140
9143
  return {
9141
9144
  ...fieldCountMap2,
@@ -9148,6 +9151,9 @@ var SerializerService = class {
9148
9151
  }
9149
9152
  const rootFieldCount = fieldCountMap[rootFieldName];
9150
9153
  const rootFieldChildrenCount = Object.keys(rootFieldValue).length;
9154
+ if (!rootFieldCount) {
9155
+ return;
9156
+ }
9151
9157
  if (rootFieldCount < rootFieldChildrenCount) {
9152
9158
  return;
9153
9159
  }