Skip to content

Commit f978a78

Browse files
authored
synchronize with fastify-errors (#197)
1 parent dd44a6d commit f978a78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function createError (code, message, Base = Error) {
77
if (!message) throw new Error('Avvio base error message must not be empty')
88

99
function AvvioError (a, b, c) {
10-
if (!(this instanceof AvvioError)) {
10+
if (!new.target) {
1111
return new AvvioError(a, b, c)
1212
}
1313

0 commit comments

Comments
 (0)