policy: revise manifest.js to avoid empty blocks

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Rich Trott authored and Node.js GitHub Bot committed 2022-02-05 12:58:31 +00:00
1 parent 78a2cd8624
commit a02099b9f2
1 file changed
+3 -5
+3 -5
View File
@@ -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);
}
}
@@ -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;
}
}