Skip to content

Commit

Permalink
Catch module not found in a less strict way
Browse files Browse the repository at this point in the history
Fixes T231135
  • Loading branch information
FlorianSW authored and d00rman committed Aug 26, 2019
1 parent e3e7598 commit b19219c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Router {
try {
return require(modName);
} catch (e) {
if (e.message !== `Cannot find module '${modName}'`) {
if (!e.message.startsWith(`Cannot find module '${modName}'`)) {
throw e;
}
if (/^\//.test(opts.mod) || (opts.baseTried && opts.modsTried)) {
Expand Down

0 comments on commit b19219c

Please sign in to comment.