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‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ function debuglog(set, cb){
8181
if(typeofcb==='function')
8282
cb(debug);
8383
switch(args.length){
84-
case0: returndebug();
8584
case1: returndebug(args[0]);
8685
case2: returndebug(args[0],args[1]);
8786
default: returndebug(...newSafeArrayIterator(args));
@@ -95,7 +94,6 @@ function debuglog(set, cb){
9594
};
9695
constlogger=(...args)=>{
9796
switch(args.length){
98-
case0: returndebug();
9997
case1: returndebug(args[0]);
10098
case2: returndebug(args[0],args[1]);
10199
default: returndebug(...newSafeArrayIterator(args));

0 commit comments

Comments
(0)