| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 24a1016 commit baf30ee
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,6 +29,7 @@ const { | |||
| 29 | 29 | ArrayPrototypeJoin, | |
| 30 | 30 | ArrayPrototypeMap, | |
| 31 | 31 | ArrayPrototypePush, | |
| 32 | + ArrayPrototypePushApply, | ||
| 32 | 33 | ArrayPrototypeSlice, | |
| 33 | 34 | ArrayPrototypeSplice, | |
| 34 | 35 | ArrayPrototypeUnshift, | |
@@ -655,12 +656,11 @@ Module._findPath = function(request, paths, isMain) { | |||
| 655 | 656 | return filename; | |
| 656 | 657 | } | |
| 657 | 658 | ||
| 658 | - if (exts === undefined) { | ||
| 659 | - exts = ['']; | ||
| 660 | - } else { | ||
| 661 | - ArrayPrototypeUnshift(exts, ''); | ||
| 659 | + const extensions = ['']; | ||
| 660 | + if (exts !== undefined) { | ||
| 661 | + ArrayPrototypePushApply(extensions, exts); | ||
| 662 | 662 | } | |
| 663 | - reportModuleNotFoundToWatchMode(basePath, exts); | ||
| 663 | + reportModuleNotFoundToWatchMode(basePath, extensions); | ||
| 664 | 664 | } | |
| 665 | 665 | ||
| 666 | 666 | return false; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,3 +98,8 @@ assert.strictEqual( | |||
| 98 | 98 | require.resolve('./printA.js', {}), | |
| 99 | 99 | require.resolve('./printA.js') | |
| 100 | 100 | ); | |
| 101 | + | ||
| 102 | + assert.strictEqual( | ||
| 103 | + require.resolve('no_index/'), | ||
| 104 | + path.join(__dirname, 'node_modules', 'no_index', 'lib', 'index.js'), | ||
| 105 | + ) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments