提交 834fa7eb 编写于 作者: V vben

fix(axios): make sure that the parameter is an object before processing, fix #660

上级 56628042
......@@ -21,7 +21,11 @@ export function createNow(join: boolean, restful = false): string | object {
/**
* @description: Format request parameter time
*/
export function formatRequestDate(params: any) {
export function formatRequestDate(params: Recordable) {
if (Object.prototype.toString.call(params) !== '[object Object]') {
return;
}
for (const key in params) {
if (params[key] && params[key]._isAMomentObject) {
params[key] = params[key].format(DATE_TIME_FORMAT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册