Skip to content

Commit

Permalink
util: fixes type in argument type validation error
Browse files Browse the repository at this point in the history
PR-URL: #25103
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
aoberoi authored and MylesBorins committed May 16, 2019
1 parent 0a80e61 commit 65392be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ function inherits(ctor, superCtor) {

if (superCtor.prototype === undefined) {
throw new ERR_INVALID_ARG_TYPE('superCtor.prototype',
'Function', superCtor.prototype);
'Object', superCtor.prototype);
}
ctor.super_ = superCtor;
Object.setPrototypeOf(ctor.prototype, superCtor.prototype);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-util-inherits.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ common.expectsError(function() {
}, {
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: 'The "superCtor.prototype" property must be of type Function. ' +
message: 'The "superCtor.prototype" property must be of type Object. ' +
'Received type undefined'
});

Expand Down

0 comments on commit 65392be

Please sign in to comment.