From dafe5f711fcb19a367d2b43efa83310a135ff3cd 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 --- lib/assert.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/assert.js b/lib/assert.js index 7f69ba0c60e476..baecb38d4f33d8 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; }