Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 71432c3

Browse filesBrowse files
aoberoiaddaleax
authored andcommitted
util: fixes type in argument type validation error
PR-URL: #25103 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 067d38f commit 71432c3
Copy full SHA for 71432c3

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎lib/util.js‎

Copy file name to clipboardExpand all lines: lib/util.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ function inherits(ctor, superCtor) {
303303

304304
if (superCtor.prototype === undefined) {
305305
throw new ERR_INVALID_ARG_TYPE('superCtor.prototype',
306-
'Function', superCtor.prototype);
306+
'Object', superCtor.prototype);
307307
}
308308
Object.defineProperty(ctor, 'super_', {
309309
value: superCtor,
Collapse file

‎test/parallel/test-util-inherits.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-util-inherits.js
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.