Skip to content

Commit eb5aab2

Browse files
aoberoiaddaleax
authored andcommitted
util: fixes type in argument type validation error
PR-URL: #25103 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent bd8d682 commit eb5aab2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ function inherits(ctor, superCtor) {
302302

303303
if (superCtor.prototype === undefined) {
304304
throw new ERR_INVALID_ARG_TYPE('superCtor.prototype',
305-
'Function', superCtor.prototype);
305+
'Object', superCtor.prototype);
306306
}
307307
Object.defineProperty(ctor, 'super_', {
308308
value: superCtor,

test/parallel/test-util-inherits.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ common.expectsError(function() {
8888
}, {
8989
code: 'ERR_INVALID_ARG_TYPE',
9090
type: TypeError,
91-
message: 'The "superCtor.prototype" property must be of type Function. ' +
91+
message: 'The "superCtor.prototype" property must be of type Object. ' +
9292
'Received type undefined'
9393
});
9494

0 commit comments

Comments
 (0)