mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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:
1 parent
78a2cd8624
commit
a02099b9f2
1 file changed
+3
-5
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user