Skip to content

Commit 8d53c24

Browse files
aoberoiBethGriggs
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 4c0a5c6 commit 8d53c24

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

282282
if (superCtor.prototype === undefined) {
283283
throw new ERR_INVALID_ARG_TYPE('superCtor.prototype',
284-
'Function', superCtor.prototype);
284+
'Object', superCtor.prototype);
285285
}
286286
ctor.super_ = superCtor;
287287
Object.setPrototypeOf(ctor.prototype, superCtor.prototype);

test/parallel/test-util-inherits.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ common.expectsError(function() {
8080
}, {
8181
code: 'ERR_INVALID_ARG_TYPE',
8282
type: TypeError,
83-
message: 'The "superCtor.prototype" property must be of type Function. ' +
83+
message: 'The "superCtor.prototype" property must be of type Object. ' +
8484
'Received type undefined'
8585
});
8686

0 commit comments

Comments
 (0)