Skip to content

Commit e1ad31b

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function fastifyWebsocket (fastify, opts, next) {
169169
}
170170

171171
if (typeof wsHandler !== 'function') {
172-
throw new Error('invalid wsHandler function')
172+
throw new TypeError('invalid wsHandler function')
173173
}
174174
}
175175

0 commit comments

Comments
 (0)