diff --git a/src/core/helpers/params.js b/src/core/helpers/params.js index 573006d5ec407dc1a54e668983c44008001e7a0f..03175bdf242c1b6b5bc7fd16af2af186d535a322 100644 --- a/src/core/helpers/params.js +++ b/src/core/helpers/params.js @@ -79,7 +79,9 @@ function assertType (value, type) { valid = t === expectedType.toLowerCase() if (!valid && t === 'object') { valid = value instanceof type - } + } + } else if (value.byteLength >= 0) { + valid = true } else if (expectedType === 'Object') { valid = isPlainObject(value) } else if (expectedType === 'Array') { diff --git a/src/core/helpers/protocol/network/request.js b/src/core/helpers/protocol/network/request.js index b119a255000f51045ddd5d85de1b024e0f570256..dee53a1c9d71652eaffe1de56453d9648708db83 100644 --- a/src/core/helpers/protocol/network/request.js +++ b/src/core/helpers/protocol/network/request.js @@ -59,7 +59,7 @@ export const request = { } }, data: { - type: [Object, String, ArrayBuffer], + type: [Object, String, Array, ArrayBuffer], validator (value, params) { params.data = value || '' }