fix(测试跟踪): 自定义字段值为空对象或空数组字符时解析有误
--bug=1024909 --user=宋昌昌 【测试跟踪】github#23178,自定义字段文本框输入{}会自动变为[object Object] https://www.tapd.cn/55049933/s/1356477
This commit is contained in:
parent
3a7390690e
commit
159fe14f4b
|
@ -197,8 +197,8 @@ export function sortCustomFields(customFields) {
|
||||||
let total = 0; //定义total用于控制循环结束
|
let total = 0; //定义total用于控制循环结束
|
||||||
for (let i = 0; total < customFields.length; total++) {
|
for (let i = 0; total < customFields.length; total++) {
|
||||||
if (
|
if (
|
||||||
typeof customFields[i].defaultValue === "string" ||
|
(typeof customFields[i].defaultValue === "string" ||
|
||||||
customFields[i].defaultValue instanceof String
|
customFields[i].defaultValue instanceof String) && customFields[i].defaultValue !== '{}' && customFields[i].defaultValue !== '[]'
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
customFields[i].defaultValue = JSON.parse(customFields[i].defaultValue);
|
customFields[i].defaultValue = JSON.parse(customFields[i].defaultValue);
|
||||||
|
|
Loading…
Reference in New Issue