From 32b264c33bdc14f151810568cba1a39069f8c73c 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 c08f26986431bb..f18cc45fc3fe2f 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -291,7 +291,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; }