util: fixes type in argument type validation error

PR-URL: https://github.com/nodejs/node/pull/25103
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Ankur Oberoi 2018-12-17 17:18:55 -08:00 committed by Anna Henningsen
parent bd8d682e21
commit eb5aab2c46
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9
2 changed files with 2 additions and 2 deletions

View File

@ -302,7 +302,7 @@ function inherits(ctor, superCtor) {
if (superCtor.prototype === undefined) {
throw new ERR_INVALID_ARG_TYPE('superCtor.prototype',
'Function', superCtor.prototype);
'Object', superCtor.prototype);
}
Object.defineProperty(ctor, 'super_', {
value: superCtor,

View File

@ -88,7 +88,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'
});