Skip to content

Commit

Permalink
policy: revise manifest.js to avoid empty blocks
Browse files Browse the repository at this point in the history
PR-URL: #41831
Refs: https://eslint.org/docs/rules/no-empty
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
Trott authored and ruyadorno committed Feb 8, 2022
1 parent 4834be3 commit e1ae61b
Showing 1 changed file with 3 additions and 5 deletions.
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

0 comments on commit e1ae61b

Please sign in to comment.