From 7836a6d0a0785cb956d753183b8eca25943bb27e Mon Sep 17 00:00:00 2001 From: John Lafitte Date: Fri, 13 Oct 2017 12:41:01 -0500 Subject: [PATCH] cachedPart already contains result So it needs to be set as the parent object. --- lib/engine.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/engine.js b/lib/engine.js index 2c378fa..c4d22c3 100644 --- a/lib/engine.js +++ b/lib/engine.js @@ -352,10 +352,9 @@ exports.fulfill = function ( myRes, ip, bid, callback, gzip, override ) { if ( err ) { api.expires = ( now ); - tout = {}; + tout = _.isUndefined(cachedPart) ? {} : cachedPart; tout.cname = key; tout.expires = api.expires; - tout.result = _.isUndefined(cachedPart) ? {} : cachedPart; tout.fromcache = true; tout.err = err; winston.error('Problem retrieving data for ' + bid + ' from ' + key + ': ' + JSON.stringify(err));