nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 84dadd06a5b25fcdf930934d23ac80cf38204189
parent 5f4fbacc7511edaaaf9779a66e197830a8cb7dbb
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Fri, 24 Mar 2017 10:40:53 +0300

[xhr] set binaryText to empty string if reeponse empty -- avoid errors when parsing

Diffstat:
Msrc/lib/xhr-promise/index.js | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/lib/xhr-promise/index.js b/src/lib/xhr-promise/index.js @@ -65,6 +65,7 @@ class XMLHttpRequestPromise { const xhr = this.xhr; if (xhr.readyState === 4 && !this._aborted) { // console.log('ready state 4', this.url); + xhr.responseBinaryText = ''; if (this.responseType === 'binarystring' && xhr.response && xhr.response.byteLength) { xhr.responseBinaryText = arrayBufferToString(xhr.response); }