We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f0e2e2 commit 2af79fdCopy full SHA for 2af79fd
1 file changed
src/service.js
@@ -235,10 +235,17 @@ module.exports = function (mixinOptions) {
235
});
236
} else {
237
const params = {};
238
+ let hasRootKeyValue = false;
239
if (root && rootKeys) {
240
rootKeys.forEach(key => {
- _.set(params, rootParams[key], _.get(root, key));
241
+ const v = _.get(root, key);
242
+ _.set(params, rootParams[key], v);
243
+ if (v != null) hasRootKeyValue = true;
244
245
+
246
+ if (def.skipNullKeys && !hasRootKeyValue) {
247
+ return null;
248
+ }
249
}
250
251
let mergedParams = _.defaultsDeep({}, args, params, staticParams);
0 commit comments