Fix(http): invalidStateError response body

Check on null value failed with last version of mozilla.
Check on undefined type instead.
This commit is contained in:
Flounn 2016-11-19 21:28:06 +01:00 committed by vsavkin
parent b2b72190f8
commit 94b8612e4e
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ export class XHRConnection implements Connection {
// responseText is the old-school way of retrieving response (supported by IE8 & 9)
// response/responseType properties were introduced in ResourceLoader Level2 spec
// (supported by IE10)
body = _xhr.response == null ? _xhr.responseText : _xhr.response;
body = (typeof _xhr.response === 'undefined') ? _xhr.responseText : _xhr.response;
// Implicitly strip a potential XSSI prefix.
if (typeof body === 'string') {