Skip to content

Commit 3429991

Browse files
committed
assert: remove unneeded condition
PR-URL: nodejs#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 f18e08d commit 3429991

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
@@ -294,7 +294,8 @@ assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
294294
};
295295

296296
function expectedException(actual, expected) {
297-
if (!actual || !expected) {
297+
// actual is guaranteed to be an Error object, but we need to check expected.
298+
if (!expected) {
298299
return false;
299300
}
300301

0 commit comments

Comments
 (0)