Skip to content

Commit

Permalink
fixed mapRange not ignoring null values
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Nov 25, 2024
1 parent c53fbc9 commit 5689b9f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/formulas/formulas/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,13 @@ export const mapRange = async <V>({
: undefined,
limit
)
)?.map(({ name: nameAndKey, value }) => ({
key: nameAndKey.slice(name.length + 1),
value,
})) ?? []
)
// Remove deleted values.
?.filter(({ value }) => value !== null)
.map(({ name: nameAndKey, value }) => ({
key: nameAndKey.slice(name.length + 1),
value,
})) ?? []

/**
* Potentially load a value at a height from a transformed snapshot. Returns
Expand Down

0 comments on commit 5689b9f

Please sign in to comment.