Skip to content

Commit

Permalink
explicit undefined check for formula fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Nov 25, 2024
1 parent 5689b9f commit 2023eb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/formulas/formulas/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const makeSimpleContractFormula = <
}, Promise.resolve<T | undefined>(undefined) as Promise<T | undefined>)
: undefined)

if (!value) {
if (value === undefined) {
if (fallback !== undefined) {
return fallback
}
Expand Down

0 comments on commit 2023eb4

Please sign in to comment.