Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
policy: revise manifest.js to avoid empty blocks
  • Loading branch information
Trott committed Feb 5, 2022
commit 81c2d33c270dbaf18f1e6ea5fcab71577be469c9
8 changes: 3 additions & 5 deletions lib/internal/policy/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,11 @@ class Manifest {

if (objectButNotArray(obj) && 'onerror' in obj) {
const behavior = obj.onerror;
if (behavior === 'throw') {
} else if (behavior === 'exit') {
if (behavior === 'exit') {
reaction = REACTION_EXIT;
} else if (behavior === 'log') {
reaction = REACTION_LOG;
} else {
} else if (behavior !== 'throw') {
throw new ERR_MANIFEST_UNKNOWN_ONERROR(behavior);
}
}
Expand Down Expand Up @@ -579,8 +578,7 @@ class Manifest {
const entry = this.#scopeIntegrities.get(scope);
if (entry === true) {
return true;
} else if (entry === kCascade) {
} else {
} else if (entry !== kCascade) {
break;
}
}
Expand Down