Skip to content

Commit 87b1786

Browse files
authored
Merge pull request #3530 from pandamicro/develop
Avoid setting responseType in synchronous xhr
2 parents 5b29cfb + b209557 commit 87b1786

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: cocos2d/core/utils/BinaryLoader.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ cc.loader.loadBinarySync = function (url) {
8181
req.timeout = 0;
8282
var errInfo = "load " + url + " failed!";
8383
req.open('GET', url, false);
84-
req.responseType = 'arraybuffer';
8584
var arrayInfo = null;
8685
if (cc.loader.loadBinary._IEFilter) {
8786
req.setRequestHeader("Accept-Charset", "x-user-defined");
@@ -104,7 +103,7 @@ cc.loader.loadBinarySync = function (url) {
104103
return null;
105104
}
106105

107-
arrayInfo = new Uint8Array(req.response);
106+
arrayInfo = self._str2Uint8Array(req.responseText);
108107
}
109108
return arrayInfo;
110109
};

0 commit comments

Comments
 (0)