Skip to content

Commit 2b082de

Browse files
TrottBethGriggs
authored andcommitted
util: remove unused fast path in internal debuglog
The internal `debuglog()` is never called with 0 parameters. Remove the fast-path for that situation. If it ever occurs, it will fall through to the default path. PR-URL: #41605 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 4b174ce commit 2b082de

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/internal/util/debuglog.js

-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ function debuglog(set, cb) {
8181
if (typeof cb === 'function')
8282
cb(debug);
8383
switch (args.length) {
84-
case 0: return debug();
8584
case 1: return debug(args[0]);
8685
case 2: return debug(args[0], args[1]);
8786
default: return debug(...new SafeArrayIterator(args));
@@ -95,7 +94,6 @@ function debuglog(set, cb) {
9594
};
9695
const logger = (...args) => {
9796
switch (args.length) {
98-
case 0: return debug();
9997
case 1: return debug(args[0]);
10098
case 2: return debug(args[0], args[1]);
10199
default: return debug(...new SafeArrayIterator(args));

0 commit comments

Comments
 (0)