Skip to content

Commit d6baddb

Browse files
committed
fix: AnimatedTransform for @react-spring/native
We only care about FluidValue objects, not Animated objects
1 parent d94b278 commit d6baddb

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

targets/native/src/AnimatedTransform.ts

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
import { each } from 'shared'
2-
import {
3-
Animated,
4-
isAnimated,
5-
AnimatedValue,
6-
AnimatedObject,
7-
} from '@react-spring/animated'
1+
import { each, isFluidValue } from 'shared'
2+
import { Animated, AnimatedValue, AnimatedObject } from '@react-spring/animated'
83

94
type Transform = { [key: string]: string | number | Animated }
105

@@ -21,7 +16,7 @@ export class AnimatedTransform extends AnimatedObject {
2116
? this.source.map(source => {
2217
const transform: any = {}
2318
each(source, (source, key) => {
24-
transform[key] = isAnimated(source) ? source.getValue() : source
19+
transform[key] = isFluidValue(source) ? source.get() : source
2520
})
2621
return transform
2722
})

0 commit comments

Comments
 (0)