@bedrockio/model 0.1.16 → 0.1.17

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.
@@ -234,7 +234,7 @@ function setNodePath(node, options) {
234
234
  exclude
235
235
  });
236
236
  halt = true;
237
- } else {
237
+ } else if ((0, _utils.isSchemaTypedef)(field)) {
238
238
  node[key] = null;
239
239
  }
240
240
  } else if (type === 'virtual') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrockio/model",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Bedrock utilities for model creation.",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/include.js CHANGED
@@ -2,7 +2,7 @@ import mongoose from 'mongoose';
2
2
  import { escapeRegExp } from 'lodash';
3
3
  import yd from '@bedrockio/yada';
4
4
 
5
- import { resolveInnerField } from './utils';
5
+ import { resolveInnerField, isSchemaTypedef } from './utils';
6
6
  import { POPULATE_MAX_DEPTH } from './const';
7
7
 
8
8
  // @ts-ignore
@@ -218,7 +218,7 @@ function setNodePath(node, options) {
218
218
  exclude,
219
219
  });
220
220
  halt = true;
221
- } else {
221
+ } else if (isSchemaTypedef(field)) {
222
222
  node[key] = null;
223
223
  }
224
224
  } else if (type === 'virtual') {