From 24a26953a7c2e69cd365270a464bd4d347f70771 Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Tue, 28 Feb 2012 18:06:30 -0800 Subject: [PATCH] Account for undefined argument. --- node/utils/caching_middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/utils/caching_middleware.js b/node/utils/caching_middleware.js index 2cdb2dfc..8c51f662 100644 --- a/node/utils/caching_middleware.js +++ b/node/utils/caching_middleware.js @@ -87,7 +87,7 @@ CachingMiddleware.prototype = new function () { // Update cache var buffer = ''; - Object.keys(headers).forEach(function (key) { + Object.keys(headers || {}).forEach(function (key) { res.setHeader(key, headers[key]); }); headers = _headers;