From 090037a41ab8311e16c454039713087023c3bcbf Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 10 Feb 2017 23:45:03 -0800 Subject: [PATCH] assert: remove unneeded condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/11314 Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Michael Dawson --- lib/assert.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/assert.js b/lib/assert.js index e5b4edb76ec655..3c94d2ae0c88b0 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -290,7 +290,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; }