Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Perform deep validation before shallow. [closes #768]
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Mar 27, 2019
1 parent 950e741 commit ee814da
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/module/esm/validate-deep.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ function init() {
function validateDeep(entry, seen) {
const { children } = entry

for (const name in children) {
validate(children[name], entry)
}

if (seen === void 0) {
seen = new Set
} else if (seen.has(entry)) {
Expand All @@ -40,6 +36,8 @@ function init() {
if (childEntry.type !== TYPE_CJS) {
validateDeep(childEntry, seen)
}

validate(childEntry, entry)
}
}

Expand Down

0 comments on commit ee814da

Please sign in to comment.