Skip to content

Commit

Permalink
Tailor for 'patch' if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
wswoodruff committed Jun 9, 2020
1 parent 9396251 commit a1bae34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ internals.patchSchema = (schema) => {
// Make all keys optional, do not enforce defaults

if (keys.length) {
schema = schema.fork(keys, (s) => s.optional());
schema = schema.tailor('patch').fork(keys, (s) => s.optional());
}

return schema.prefs({ noDefaults: true });
Expand Down

0 comments on commit a1bae34

Please sign in to comment.