fix(import/postman): handle non-string form values (#4645)

Co-authored-by: nivedin <nivedinp@gmail.com>
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
med8bra 2025-02-06 12:37:27 +01:00 committed by jamesgeorge007
parent 56900d37ac
commit 37b7ddf2b0

View file

@ -296,7 +296,7 @@ const getHoppReqBody = ({
<FormDataKeyValue>{
key: replacePMVarTemplating(param.key),
value: replacePMVarTemplating(
param.type === "text" ? (param.value as string) : ""
param.type === "text" ? String(param.value) : ""
),
active: !param.disabled,
isFile: false, // TODO: Preserve isFile state ?
@ -313,7 +313,7 @@ const getHoppReqBody = ({
(param) =>
`${replacePMVarTemplating(
param.key ?? ""
)}: ${replacePMVarTemplating(param.value ?? "")}`
)}: ${replacePMVarTemplating(String(param.value ?? ""))}`
),
stringArrayJoin("\n")
),