fix
This commit is contained in:
parent
e1be32333e
commit
91a770a2a0
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -84,14 +84,23 @@ export const devItem = (
|
|||
value: null as any,
|
||||
};
|
||||
}
|
||||
} else if (v.value === v.valueBuilt) {
|
||||
result[k] = JSON.parse(v.value);
|
||||
} else {
|
||||
result[k] = {
|
||||
mode: "raw",
|
||||
value: v.value,
|
||||
valueBuilt: v.valueBuilt,
|
||||
};
|
||||
let vbuilt =
|
||||
typeof v.valueBuilt === "string"
|
||||
? (v.valueBuilt.trim() as string)
|
||||
: "";
|
||||
if (vbuilt.endsWith(";\n")) {
|
||||
vbuilt = vbuilt.substring(0, vbuilt.length - ";\n".length);
|
||||
}
|
||||
if (vbuilt && vbuilt === v.value.trim()) {
|
||||
result[k] = { mode: "string", value: JSON.parse(v.value) };
|
||||
} else {
|
||||
result[k] = {
|
||||
mode: "raw",
|
||||
value: v.value,
|
||||
valueBuilt: v.valueBuilt,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue