Skip to content

Commit 71432c3

Browse files
aoberoiaddaleax
authored andcommitted
util: fixes type in argument type validation error
PR-URL: #25103 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 067d38f commit 71432c3

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
@@ -303,7 +303,7 @@ function inherits(ctor, superCtor) {
303303

304304
if (superCtor.prototype === undefined) {
305305
throw new ERR_INVALID_ARG_TYPE('superCtor.prototype',
306-
'Function', superCtor.prototype);
306+
'Object', superCtor.prototype);
307307
}
308308
Object.defineProperty(ctor, 'super_', {
309309
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)