Skip to content

Commit

Permalink
🥅 parse set field if value set to false
Browse files Browse the repository at this point in the history
  • Loading branch information
hemedani committed Nov 4, 2023
1 parent 969b052 commit 56c12da
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/server/playground/comp/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ export const Main = ({ urlAddress }: { urlAddress: string }) => {

const copyRequest = () => {
const request: any = requestFunction();
console.log(request);
request.body.body = JSON.parse(request.body.body);
navigator.clipboard.writeText(JSON.stringify(request));
};
Expand Down
2 changes: 1 addition & 1 deletion src/server/playground/utils/createNestedObjectsFromKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const createNestedObjectsFromKeys = (

// For each object path (property key) in the object
for (const objectPath in obj) {
if (obj[objectPath] || obj[objectPath] === 0) {
if (obj[objectPath] || obj[objectPath] === 0 || obj[objectPath] === false) {
// Split path into component parts
const parts = objectPath.split(".");

Expand Down

0 comments on commit 56c12da

Please sign in to comment.