mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fix(load) add arraybuffer check
This commit is contained in:
parent
68a34f6224
commit
8b7f93cc69
1 changed files with 2 additions and 1 deletions
|
|
@ -164,6 +164,7 @@ var Util, DOM;
|
|||
p = params, countProgress,
|
||||
isObject = Util.type.object(p.data),
|
||||
isArray = Util.type.array(p.data),
|
||||
isArrayBuf = Util.type(p.data) === 'arraybuffer',
|
||||
type = p.type || p.method || 'GET',
|
||||
xhr = new XMLHttpRequest();
|
||||
|
||||
|
|
@ -172,7 +173,7 @@ var Util, DOM;
|
|||
if (p.responseType)
|
||||
xhr.responseType = p.responseType;
|
||||
|
||||
if (isObject || isArray)
|
||||
if (!isArrayBuf && isObject || isArray)
|
||||
data = Util.json.stringify(p.data);
|
||||
else
|
||||
data = p.data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue