Skip to content

Commit cd7e211

Browse files
authored
refactor(index): throw typeerror if condition is checking type
Signed-off-by: Frazer Smith <[email protected]>
1 parent 035a3c7 commit cd7e211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function fastifyWebsocket (fastify, opts, next) {
168168
}
169169

170170
if (typeof wsHandler !== 'function') {
171-
throw new Error('invalid wsHandler function')
171+
throw new TypeError('invalid wsHandler function')
172172
}
173173
}
174174

0 commit comments

Comments
 (0)