Skip to content

Commit

Permalink
Fix validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jun 5, 2022
1 parent 1eed8e0 commit 8996e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/error/modern/opts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const isObject = function (value) {
}

const validateOnCreate = function (onCreate) {
if (typeof onCreate !== 'function') {
if (onCreate !== undefined && typeof onCreate !== 'function') {
throw new TypeError(`"onCreate" option must be a function: ${onCreate}`)
}
}

0 comments on commit 8996e77

Please sign in to comment.