Skip to content

Commit

Permalink
fix: Maximum call stack size exceeded in some cases
Browse files Browse the repository at this point in the history
Closes: #4
  • Loading branch information
d4rkr00t committed Mar 12, 2018
1 parent e230e80 commit 960f8ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/analyze.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ const pickFromModules = (modules) /*: Array<PreModule> */ =>
const buildModuleDepsChains = (modules, name) => {
const module = modules[name];
return module.reasons.reduce((acc, reason) => {
if (name === reason.clearName) {
return acc;
}

if (reason.type !== "module" || !modules[reason.clearName]) {
return acc;
}
Expand Down

0 comments on commit 960f8ac

Please sign in to comment.