diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/shared/customDiffEditor.js b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/shared/customDiffEditor.js index 8d405033e5..dc5e61ca4c 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/shared/customDiffEditor.js +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/components/shared/customDiffEditor.js @@ -256,7 +256,7 @@ const transform = { }) } finalData = finalData.split("\n").sort().join("\n"); - const isPayloadEmpty = Object.keys(payLoad).length === 0 + const isPayloadEmpty = payLoad === null || Object.keys(payLoad).length === 0 const isMultiformData = data?.json?.requestHeaders?.['content-type']?.includes('multipart/form-data') return (localFirstLine + "\n" + finalData + (finalData.trim().length === 0 || isPayloadEmpty ? "\n" : "\n\n") + (!isPayloadEmpty ? (isMultiformData ? payLoad : this.formatJson(payLoad)) : '')) }