From 5f3ebafbf2c6740ef074abf86464ae7537e59c29 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 21 Sep 2018 09:27:41 -0400 Subject: [PATCH] minor code review --- src/js/traffic.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index cde1eb189..e1f8cf794 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -609,10 +609,7 @@ var onHeadersReceived = function(details) { if ( i !== -1 ) { responseHeaders[i].value = cacheControl; } else { - responseHeaders[responseHeaders.length] = { - name: 'Cache-Control', - value: cacheControl - }; + responseHeaders.push({ name: 'Cache-Control', value: cacheControl }); } modifiedHeaders = true; }