From fdad39201163974681560a9198da683786750273 Mon Sep 17 00:00:00 2001 From: Denis Logachev Date: Mon, 11 Dec 2017 18:59:50 +0200 Subject: [PATCH] XDomainRequest.send exception fix (#1942) --- src/ajax.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ajax.js b/src/ajax.js index 19dc1b3869f..df52ac949da 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -98,7 +98,11 @@ export function ajaxBuilder(timeout = 3000) { } x.setRequestHeader('Content-Type', options.contentType || 'text/plain'); } - x.send(method === 'POST' && data); + if (method === 'POST' && data) { + x.send(data); + } else { + x.send(); + } } catch (error) { utils.logError('xhr construction', error); }