From 37b7ddf2b09686c9aff2acf6940767f29833c600 Mon Sep 17 00:00:00 2001 From: med8bra Date: Thu, 6 Feb 2025 12:37:27 +0100 Subject: [PATCH] fix(import/postman): handle non-string form values (#4645) Co-authored-by: nivedin Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com> --- .../src/helpers/import-export/import/postman.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hoppscotch-common/src/helpers/import-export/import/postman.ts b/packages/hoppscotch-common/src/helpers/import-export/import/postman.ts index e43697e8..b3ddc019 100644 --- a/packages/hoppscotch-common/src/helpers/import-export/import/postman.ts +++ b/packages/hoppscotch-common/src/helpers/import-export/import/postman.ts @@ -296,7 +296,7 @@ const getHoppReqBody = ({ { 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") ),