Skip to content

Commit fe1e8ea

Browse files
committed
util: fixes type in argument type validation error
1 parent 19a9205 commit fe1e8ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ function inherits(ctor, superCtor) {
317317

318318
if (superCtor.prototype === undefined) {
319319
throw new ERR_INVALID_ARG_TYPE('superCtor.prototype',
320-
'Function', superCtor.prototype);
320+
'Object', superCtor.prototype);
321321
}
322322
Object.defineProperty(ctor, 'super_', {
323323
value: superCtor,

test/parallel/test-util-inherits.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ common.expectsError(function() {
8888
}, {
8989
code: 'ERR_INVALID_ARG_TYPE',
9090
type: TypeError,
91-
message: 'The "superCtor.prototype" property must be of type Function. ' +
91+
message: 'The "superCtor.prototype" property must be of type Object. ' +
9292
'Received type undefined'
9393
});
9494

0 commit comments

Comments
 (0)