Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e1ae61b

Browse filesBrowse files
Trottruyadorno
authored andcommitted
policy: revise manifest.js to avoid empty blocks
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>
1 parent 4834be3 commit e1ae61b
Copy full SHA for e1ae61b

File tree

Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed
Open diff view settings
Collapse file

‎lib/internal/policy/manifest.js‎

Copy file name to clipboardExpand all lines: lib/internal/policy/manifest.js
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,12 +430,11 @@ class Manifest {
430430

431431
if (objectButNotArray(obj) && 'onerror' in obj) {
432432
const behavior = obj.onerror;
433-
if (behavior === 'throw') {
434-
} else if (behavior === 'exit') {
433+
if (behavior === 'exit') {
435434
reaction = REACTION_EXIT;
436435
} else if (behavior === 'log') {
437436
reaction = REACTION_LOG;
438-
} else {
437+
} else if (behavior !== 'throw') {
439438
throw new ERR_MANIFEST_UNKNOWN_ONERROR(behavior);
440439
}
441440
}
@@ -579,8 +578,7 @@ class Manifest {
579578
const entry = this.#scopeIntegrities.get(scope);
580579
if (entry === true) {
581580
return true;
582-
} else if (entry === kCascade) {
583-
} else {
581+
} else if (entry !== kCascade) {
584582
break;
585583
}
586584
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.