Skip to content

Commit

Permalink
fix: typeof null === object fix for sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
nandorojo committed Sep 2, 2021
1 parent 413637e commit 80f7092
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/use-map-animate-to-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export default function useMapAnimateToStyle<Animate>({
const sequence = sequenceArray
.filter((step) => {
// remove null, false values to allow for conditional styles
if (typeof step === 'object') {
if (step && typeof step === 'object') {
return step?.value != null && step?.value !== false
}
return step != null && step !== false
Expand All @@ -404,7 +404,7 @@ export default function useMapAnimateToStyle<Animate>({
let stepValue = step
let stepConfig = Object.assign({}, config)
let stepAnimation = animation
if (step && typeof step === 'object') {
if (typeof step === 'object') {
// not allowed in Reanimated: { delay, value, ...transition } = step
const stepTransition = Object.assign({}, step)

Expand Down

0 comments on commit 80f7092

Please sign in to comment.