frontend/.pnpm-store/v3/files/2a/c8223a4546f002d811e0c8783900208405d6b674f47ac9ac1ab3a46f08d40aa0fb269def94efe593cb30eaf24586d598f110dfbf3c4da60ed94dbcaa51a175

26 lines
674 B
Plaintext

export function getXHRResponse(xhr) {
switch (xhr.responseType) {
case 'json': {
if ('response' in xhr) {
return xhr.response;
}
else {
const ieXHR = xhr;
return JSON.parse(ieXHR.responseText);
}
}
case 'document':
return xhr.responseXML;
case 'text':
default: {
if ('response' in xhr) {
return xhr.response;
}
else {
const ieXHR = xhr;
return ieXHR.responseText;
}
}
}
}
//# sourceMappingURL=getXHRResponse.js.map