Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ad33b51

Browse files
aoberoiBethGriggs
authored andcommittedApr 28, 2019
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 4eaaeb5 commit ad33b51

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)
Please sign in to comment.