Skip to content

Commit 090037a

Browse files
TrottMylesBorins
authored andcommitted
assert: remove unneeded condition
PR-URL: #11314 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 0c9ea4f commit 090037a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/assert.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
290290
};
291291

292292
function expectedException(actual, expected) {
293-
if (!actual || !expected) {
293+
// actual is guaranteed to be an Error object, but we need to check expected.
294+
if (!expected) {
294295
return false;
295296
}
296297

0 commit comments

Comments
 (0)