From 11157999eb0f4a2a0bff99050580c435e6b5b880 Mon Sep 17 00:00:00 2001 From: Sean Nichols Date: Mon, 23 Jan 2017 13:44:39 -0500 Subject: [PATCH] Remove use of Object.keys and Array.prototype.forEach for IE8 compatibility --- src/openseadragon.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index d2c52174..dae45c68 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -2188,12 +2188,11 @@ function OpenSeadragon( options ){ } if (headers) { - Object.keys(headers).forEach(function (headerName) { - // Falsy header values will be ignored - if (headers[headerName]) { + for (var headerName in headers) { + if (headers.hasOwnProperty(headerName) && headers[headerName]) { request.setRequestHeader(headerName, headers[headerName]); } - }); + } } if (withCredentials) {