Skip to content

Commit

Permalink
fix: falsy logic type check
Browse files Browse the repository at this point in the history
  • Loading branch information
csgulati09 committed Apr 20, 2024
1 parent f89c01c commit 72dfa56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apis/createHeaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const createHeaders = (config: Record<string, any>): Record<string, strin
continue
}

// false logic (enter all the cases here, where we take a boolean input)
if (k.toLocaleLowerCase() === "debug" || k.toLocaleLowerCase() === "cacheforcerefresh") {
// false logic (type is boolean, to handle flasy logic)
if (typeof v === "boolean") {
v = v.toString()
}

Expand Down

0 comments on commit 72dfa56

Please sign in to comment.