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:
parent
bd8d682e21
commit
eb5aab2c46
@ -302,7 +302,7 @@ function inherits(ctor, superCtor) {
|
|||||||
|
|
||||||
if (superCtor.prototype === undefined) {
|
if (superCtor.prototype === undefined) {
|
||||||
throw new ERR_INVALID_ARG_TYPE('superCtor.prototype',
|
throw new ERR_INVALID_ARG_TYPE('superCtor.prototype',
|
||||||
'Function', superCtor.prototype);
|
'Object', superCtor.prototype);
|
||||||
}
|
}
|
||||||
Object.defineProperty(ctor, 'super_', {
|
Object.defineProperty(ctor, 'super_', {
|
||||||
value: superCtor,
|
value: superCtor,
|
||||||
|
@ -88,7 +88,7 @@ common.expectsError(function() {
|
|||||||
}, {
|
}, {
|
||||||
code: 'ERR_INVALID_ARG_TYPE',
|
code: 'ERR_INVALID_ARG_TYPE',
|
||||||
type: TypeError,
|
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'
|
'Received type undefined'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user