From 7a2ca923b79121c34447cec594060d07aae05427 Mon Sep 17 00:00:00 2001 From: Alexander Clouter Date: Tue, 27 Jul 2021 13:28:50 +0100 Subject: [PATCH] ajax: if xfr.open() explodes let the caller know (#7161) IE11 explodes on .open for deleted URLs created from URL.createObjectURL --- src/ajax.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ajax.js b/src/ajax.js index b1e4cbdbdff..a6317e7963d 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -66,7 +66,7 @@ export function ajaxBuilder(timeout = 3000, {request, done} = {}) { } x.open(method, url, true); - // IE needs timoeut to be set after open - see #1410 + // IE needs timeout to be set after open - see #1410 // Disabled timeout temporarily to avoid xhr failed requests. https://github.com/prebid/Prebid.js/issues/2648 if (!config.getConfig('disableAjaxTimeout')) { x.timeout = timeout; @@ -94,6 +94,7 @@ export function ajaxBuilder(timeout = 3000, {request, done} = {}) { } } catch (error) { utils.logError('xhr construction', error); + typeof callback === 'object' && callback !== null && callback.error(error); } } }