From 85df33cdaa3de42db1faae3b6809b29f2603e326 Mon Sep 17 00:00:00 2001 From: Tyler Pedelose Date: Tue, 26 Jun 2018 12:22:20 -0400 Subject: [PATCH] Made is_request_sources_undefined more direct --- controller/predicates/is_request_sources_undefined.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/controller/predicates/is_request_sources_undefined.js b/controller/predicates/is_request_sources_undefined.js index 504a5f14..77e8afea 100644 --- a/controller/predicates/is_request_sources_undefined.js +++ b/controller/predicates/is_request_sources_undefined.js @@ -5,9 +5,8 @@ const stackTraceLine = require('../../helper/stackTraceLine'); // returns true IFF there are no requested sources module.exports = (req, res) => { - const is_request_sources_undefined = _.isEqual( - _.get(req, 'clean.sources', []), - [] + const is_request_sources_undefined = _.isEmpty( + _.get(req, 'clean.sources') ); debugLog.push(req, () => ({ reply: is_request_sources_undefined,