diff --git a/engine.io.js b/engine.io.js index 9ed4a0c61..5c4f54a8c 100644 --- a/engine.io.js +++ b/engine.io.js @@ -1302,11 +1302,9 @@ return /******/ (function(modules) { // webpackBootstrap contentType = this.xhr.getResponseHeader('Content-Type'); } catch (e) {} if (contentType === 'application/octet-stream') { - if (this.xhr.responseType === 'arraybuffer') { - data = this.xhr.response || this.xhr.responseText; - } else { - data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response)); - } + data = this.xhr.response || this.xhr.responseText; + } else if (this.xhr.responseType === 'arraybuffer') { + data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response)); } else { data = this.xhr.responseText; } diff --git a/package.json b/package.json index 4cd44caa1..010403d58 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "engine.io-client", "description": "Client for the realtime Engine", "license": "MIT", - "version": "3.1.5", + "version": "3.2.0", "main": "lib/index.js", "homepage": "https://github.com/socketio/engine.io-client", "contributors": [ @@ -45,7 +45,7 @@ "concat-stream": "^1.6.0", "del": "^2.2.2", "derequire": "^2.0.6", - "engine.io": "3.1.5", + "engine.io": "3.2.0", "eslint-config-standard": "4.4.0", "eslint-plugin-standard": "1.3.1", "expect.js": "^0.3.1",