We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd44a6d commit f978a78Copy full SHA for f978a78
lib/errors.js
@@ -7,7 +7,7 @@ function createError (code, message, Base = Error) {
7
if (!message) throw new Error('Avvio base error message must not be empty')
8
9
function AvvioError (a, b, c) {
10
- if (!(this instanceof AvvioError)) {
+ if (!new.target) {
11
return new AvvioError(a, b, c)
12
}
13
0 commit comments