From 73ea7168c896e960fe73b64f48d8a27d1552e06b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E5=BF=85=E5=B7=9D?= Date: Thu, 5 Oct 2023 14:53:36 +0800 Subject: [PATCH] update --- model/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/index.js b/model/index.js index b650c51..6bb6f42 100644 --- a/model/index.js +++ b/model/index.js @@ -200,7 +200,10 @@ for (let i = 0; i < targetArray.length; i++) { pre[cur.name] = { type: fieldTypes[cur.type], set(value) { - if (["array", "object"].includes(cur.type)) { + if ( + ["array", "object"].includes(cur.type) && + typeof value === "string" + ) { return JSON.parse(value); } else { return value;