| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a0c5b58 commit 6014429
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -599,7 +599,9 @@ Module._resolveFilename = function(request, parent, isMain, options) { | |||
| 599 | 599 | } | |
| 600 | 600 | } | |
| 601 | 601 | } | |
| 602 | - } else if (options.paths !== undefined) { | ||
| 602 | + } else if (options.paths === undefined) { | ||
| 603 | + paths = Module._resolveLookupPaths(request, parent); | ||
| 604 | + } else { | ||
| 603 | 605 | throw new ERR_INVALID_OPT_VALUE('options.paths', options.paths); | |
| 604 | 606 | } | |
| 605 | 607 | } else { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -92,3 +92,9 @@ common.expectsError(() => { | |||
| 92 | 92 | code: 'ERR_INVALID_OPT_VALUE', | |
| 93 | 93 | type: TypeError, | |
| 94 | 94 | }); | |
| 95 | + | ||
| 96 | + // Verify that the default require.resolve() is used for empty options. | ||
| 97 | + assert.strictEqual( | ||
| 98 | + require.resolve('./printA.js', {}), | ||
| 99 | + require.resolve('./printA.js') | ||
| 100 | + ); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments