diff options
author | Rich Trott <rtrott@gmail.com> | 2017-02-10 23:45:03 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2017-02-15 14:57:24 -0800 |
commit | 3429991d8b43474cab58f067658b5ce81ace58f8 (patch) | |
tree | ef900bc85bb7ffb48864a48f49280a6857bc0d6f /lib/assert.js | |
parent | f18e08d820dde161788d95a5603546ceca021e90 (diff) | |
download | android-node-v8-3429991d8b43474cab58f067658b5ce81ace58f8.tar.gz android-node-v8-3429991d8b43474cab58f067658b5ce81ace58f8.tar.bz2 android-node-v8-3429991d8b43474cab58f067658b5ce81ace58f8.zip |
assert: remove unneeded condition
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'lib/assert.js')
-rw-r--r-- | lib/assert.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/assert.js b/lib/assert.js index 4629c883e0..cf058d57bf 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -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; } |