From 45adec2616c8456e0cd34628072c32bd83408e86 Mon Sep 17 00:00:00 2001 From: Nicholas Dangles Date: Thu, 17 May 2018 20:38:04 -0500 Subject: [PATCH] module: name anonymous function for debugging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit is to help in the effort to name all anonymous functions to help when heap debugging. The issue asked for any functions to be updated that are not on a prototype and this file contains one function that meets those needs. A previous pull request (13849) was not completed and did not meet the requirements of the issue so this PR looks to complete that. PR-URL: https://github.com/nodejs/node/pull/20811 Refs: https://github.com/nodejs/node/issues/8913 Reviewed-By: Tobias Nießen Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Benjamin Gruenbaum Reviewed-By: Ruben Bridgewater --- lib/internal/modules/cjs/loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js index e471cc013a6531..8bb5f9268437fc 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -776,7 +776,7 @@ Module._initPaths = function() { } if (nodePath) { - paths = nodePath.split(path.delimiter).filter(function(path) { + paths = nodePath.split(path.delimiter).filter(function pathsFilterCB(path) { return !!path; }).concat(paths); }