|
@@ -171,7 +171,11 @@ if (typeof PDFJS === 'undefined') {
|
|
|
if (typeof VBArray !== 'undefined') {
|
|
|
Object.defineProperty(xhrPrototype, 'response', {
|
|
|
get: function xmlHttpRequestResponseGet() {
|
|
|
- return new Uint8Array(new VBArray(this.responseBody).toArray());
|
|
|
+ if (this.responseType === 'arraybuffer') {
|
|
|
+ return new Uint8Array(new VBArray(this.responseBody).toArray());
|
|
|
+ } else {
|
|
|
+ return this.responseText;
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
return;
|