Skip to content

Commit

Permalink
assert: remove unneeded condition
Browse files Browse the repository at this point in the history
PR-URL: #11314
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
Trott authored and italoacasas committed Feb 22, 2017
1 parent 4ffad09 commit 6a2f330
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
};

function expectedException(actual, expected) {
if (!actual || !expected) {
// actual is guaranteed to be an Error object, but we need to check expected.
if (!expected) {
return false;
}

Expand Down

0 comments on commit 6a2f330

Please sign in to comment.