From c9577694273116d814733b3739e5b62badd0ea14 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Wed, 11 Mar 2020 11:13:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20sendSocketMessage=E5=8F=91=E9=80=81Array?= =?UTF-8?q?Buffer=E6=8A=A5=E9=94=99=E7=9A=84Bug=20askId:=2090434?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/helpers/params.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/helpers/params.js b/src/core/helpers/params.js index 02a982434..573006d5e 100644 --- a/src/core/helpers/params.js +++ b/src/core/helpers/params.js @@ -84,8 +84,9 @@ function assertType (value, type) { valid = isPlainObject(value) } else if (expectedType === 'Array') { valid = Array.isArray(value) - } else { - valid = value instanceof type + } else { + // TODO 页面传入的ArrayBuffer使用instanceof ArrayBuffer返回false,暂做此修改 + valid = value instanceof type || toRawType(value) === getType(type) } return { valid, -- GitLab