Skip to content

Commit

Permalink
refactor(index): use TypeError over Error (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Oct 18, 2023
1 parent 0c715a3 commit 5498085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function chooseAjvInstance (defaultInstance, ajvOpts) {
} else if (typeof ajvOpts === 'object' && typeof ajvOpts.customOptions === 'function') {
const ajv = ajvOpts.customOptions(getDefaultInstance())
if (!(ajv instanceof Ajv)) {
throw new Error('customOptions function must return an instance of Ajv')
throw new TypeError('customOptions function must return an instance of Ajv')
}
return ajv
}
Expand Down

0 comments on commit 5498085

Please sign in to comment.