Skip to content

Commit

Permalink
refactor(index): throw typeerror if checking type (#499)
Browse files Browse the repository at this point in the history
Signed-off-by: Frazer Smith <[email protected]>
  • Loading branch information
Fdawgs authored Jan 11, 2025
1 parent 997a6db commit ca555e7
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 @@ -443,7 +443,7 @@ function checkRootPathForErrors (fastify, rootPath) {

function checkPath (fastify, rootPath) {
if (typeof rootPath !== 'string') {
throw new Error('"root" option must be a string')
throw new TypeError('"root" option must be a string')
}
if (path.isAbsolute(rootPath) === false) {
throw new Error('"root" option must be an absolute path')
Expand Down

0 comments on commit ca555e7

Please sign in to comment.