Skip to content

Commit

Permalink
refactor(index): throw typeerror if condition is checking type
Browse files Browse the repository at this point in the history
Signed-off-by: Frazer Smith <[email protected]>
  • Loading branch information
Fdawgs authored Jan 10, 2025
1 parent 035a3c7 commit cd7e211
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 @@ -168,7 +168,7 @@ function fastifyWebsocket (fastify, opts, next) {
}

if (typeof wsHandler !== 'function') {
throw new Error('invalid wsHandler function')
throw new TypeError('invalid wsHandler function')
}
}

Expand Down

0 comments on commit cd7e211

Please sign in to comment.